Skip to content

Commit

Permalink
Fixed typing in PermissionCriterionResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Nov 26, 2024
1 parent 655ebf3 commit d544a90
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -19240,11 +19240,6 @@ parameters:
count: 1
path: src/lib/Repository/Permission/CachedPermissionService.php

-
message: "#^Property Ibexa\\\\Core\\\\Repository\\\\Permission\\\\CachedPermissionService\\:\\:\\$permissionCriterion \\(bool\\|Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\Criterion\\) does not accept null\\.$#"
count: 1
path: src/lib/Repository/Permission/CachedPermissionService.php

-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Permission\\\\LimitationService\\:\\:__construct\\(\\) has parameter \\$limitationTypes with no value type specified in iterable type Traversable\\.$#"
count: 1
Expand All @@ -19265,11 +19260,6 @@ parameters:
count: 1
path: src/lib/Repository/Permission/PermissionCriterionResolver.php

-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Permission\\\\PermissionCriterionResolver\\:\\:getPermissionsCriterion\\(\\) should return bool\\|Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\Criterion but returns Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\CriterionInterface\\.$#"
count: 1
path: src/lib/Repository/Permission/PermissionCriterionResolver.php

-
message: "#^PHPDoc tag @var does not specify variable name\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/Repository/PermissionCriterionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface PermissionCriterionResolver
* @param string $function
* @param array|null $targets
*
* @return bool|\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion
* @return bool|\Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface
*/
public function getPermissionsCriterion(string $module = 'content', string $function = 'read', ?array $targets = null);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Repository/Permission/CachedPermissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CachedPermissionService implements PermissionService
*
* Value is null if not yet set or cleared.
*
* @var bool|\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion
* @var null|bool|\Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface
*/
private $permissionCriterion;

Expand Down
6 changes: 0 additions & 6 deletions src/lib/Repository/Permission/PermissionCriterionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ public function __construct(
*
* @uses \Ibexa\Contracts\Core\Repository\PermissionResolver::getCurrentUserReference()
* @uses \Ibexa\Contracts\Core\Repository\PermissionResolver::hasAccess()
*
* @param string $module
* @param string $function
* @param array $targets
*
* @return bool|\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion
*/
public function getPermissionsCriterion(string $module = 'content', string $function = 'read', ?array $targets = null)
{
Expand Down

0 comments on commit d544a90

Please sign in to comment.