mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 19:28:51 +02:00
Fixed some PHPStan level 5 issues
This commit is contained in:
parent
74051c5649
commit
19530a9102
35 changed files with 95 additions and 63 deletions
|
@ -112,7 +112,7 @@ class PermissionManager
|
|||
|
||||
/** @var Group $parent */
|
||||
$parent = $user->getGroup();
|
||||
while ($parent instanceof AbstractStructuralDBElement) { //The top group, has parent == null
|
||||
while ($parent instanceof Group) { //The top group, has parent == null
|
||||
//Check if our current element gives an info about disallow/allow
|
||||
$allowed = $this->dontInherit($parent, $permission, $operation);
|
||||
if (null !== $allowed) {
|
||||
|
|
|
@ -172,12 +172,18 @@ class PermissionPresetsHelper
|
|||
return $perm_holder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-api
|
||||
*/
|
||||
private function AllForbid(HasPermissionsInterface $perm_holder): HasPermissionsInterface
|
||||
{
|
||||
$this->permissionResolver->setAllPermissions($perm_holder, PermissionData::DISALLOW);
|
||||
return $perm_holder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-api
|
||||
*/
|
||||
private function AllAllow(HasPermissionsInterface $perm_holder): HasPermissionsInterface
|
||||
{
|
||||
$this->permissionResolver->setAllPermissions($perm_holder, PermissionData::ALLOW);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue