mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-12 19:17:45 +02:00
style(ecs): add easy-coding-standard to enforce coding style rules for php
- update .devcontainer settings: remove auto-formatting for php + set intelephense as default formatter - remove prettier php plugin as it lacks php 8 support - add captain hook action for checking style pre-commit - fix style with ecs on all files except views
This commit is contained in:
parent
fb3593f828
commit
aa1612342e
230 changed files with 3420 additions and 5884 deletions
|
|
@ -24,17 +24,15 @@ class UserModel extends MythAuthUserModel
|
|||
public function getPodcastContributors(int $podcastId): array
|
||||
{
|
||||
$cacheName = "podcast#{$podcastId}_contributors";
|
||||
if (!($found = cache($cacheName))) {
|
||||
if (! ($found = cache($cacheName))) {
|
||||
$found = $this->select('users.*, auth_groups.name as podcast_role')
|
||||
->join('podcasts_users', 'podcasts_users.user_id = users.id')
|
||||
->join(
|
||||
'auth_groups',
|
||||
'auth_groups.id = podcasts_users.group_id',
|
||||
)
|
||||
->join('auth_groups', 'auth_groups.id = podcasts_users.group_id',)
|
||||
->where('podcasts_users.podcast_id', $podcastId)
|
||||
->findAll();
|
||||
|
||||
cache()->save($cacheName, $found, DECADE);
|
||||
cache()
|
||||
->save($cacheName, $found, DECADE);
|
||||
}
|
||||
|
||||
return $found;
|
||||
|
|
@ -42,9 +40,7 @@ class UserModel extends MythAuthUserModel
|
|||
|
||||
public function getPodcastContributor(int $userId, int $podcastId): ?User
|
||||
{
|
||||
return $this->select(
|
||||
'users.*, podcasts_users.podcast_id as podcast_id, auth_groups.name as podcast_role',
|
||||
)
|
||||
return $this->select('users.*, podcasts_users.podcast_id as podcast_id, auth_groups.name as podcast_role',)
|
||||
->join('podcasts_users', 'podcasts_users.user_id = users.id')
|
||||
->join('auth_groups', 'auth_groups.id = podcasts_users.group_id')
|
||||
->where([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue