Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasNorin committed Jan 10, 2025
1 parent 43c8397 commit b06dcab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion library/Admin/Private/Helper/GetUserGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public static function getUserGroups(): ?string

return $userGroup->slug ?? null;
}
}
}
14 changes: 7 additions & 7 deletions library/Admin/Private/MainQueryUserGroupRestriction.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* This class implements the Hookable interface and is responsible for handling user group restrictions in the main query.
*/
class MainQueryUserGroupRestriction
class MainQueryUserGroupRestriction
{
private string $userGroupMetaKey = 'user-group-visibility';

Expand All @@ -35,16 +35,16 @@ public function __construct(private AddAction&IsUserLoggedIn&IsPostPubliclyViewa
public function shouldRestrict(?int $postId): bool
{
if (
!$this->wpService->isUserLoggedIn() ||
$this->wpService->isPostPubliclyViewable() ||
empty($postId))
{
!$this->wpService->isUserLoggedIn() ||
$this->wpService->isPostPubliclyViewable() ||
empty($postId)
) {
return false;
}

$userGroup = \Municipio\Admin\Private\Helper\GetUserGroup::getUserGroups();
$postUserGroupMeta = $this->wpService->getPostMeta(
$postId,
$postId,
$this->userGroupMetaKey
);

Expand All @@ -54,4 +54,4 @@ public function shouldRestrict(?int $postId): bool

return false;
}
}
}
6 changes: 3 additions & 3 deletions library/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public function __construct(
* Template
*/
new \Municipio\Template(
$menuBuilder,
$menuBuilder,
$menuDirector,
$this->acfService,
$this->wpService,
$this->acfService,
$this->wpService,
$this->schemaDataConfig,
$mainQueryUserGroupRestriction
);
Expand Down

0 comments on commit b06dcab

Please sign in to comment.