diff --git a/Interfaces/PermissionInterface.php b/Interfaces/PermissionInterface.php index 4322719..4aa74e2 100755 --- a/Interfaces/PermissionInterface.php +++ b/Interfaces/PermissionInterface.php @@ -4,11 +4,11 @@ interface PermissionInterface { - /** - * Add read permission - * @param int $role - * @return self - */ + /** + * Add read permission + * @param int $role + * @return self + */ public function read(int $role): self; /** diff --git a/Interfaces/RoleInterface.php b/Interfaces/RoleInterface.php index 7c87a2c..7d3f5bd 100755 --- a/Interfaces/RoleInterface.php +++ b/Interfaces/RoleInterface.php @@ -17,7 +17,7 @@ public function setUserRole(int $userRole): void; * @param string|null $queryStr r=1&i=1&u=1&d=1 */ public function set(array|int $roleKey, ?string $queryStr = null): void; - + /** * Get role int number from role key * @param string $roleTitle diff --git a/Permission.php b/Permission.php index 9faa979..bebd7db 100755 --- a/Permission.php +++ b/Permission.php @@ -1,4 +1,5 @@ $permInt) { $roleMethod = $this->getSymlink($role); - if (is_null($roleMethod)) { + if ($roleMethod === null) { $roleMethod = $role; } if (method_exists($this, $roleMethod)) { diff --git a/Role.php b/Role.php index 87e09e1..8b88ac6 100755 --- a/Role.php +++ b/Role.php @@ -1,4 +1,5 @@ setUserRole($userRole); } } @@ -87,7 +88,7 @@ public function hasRole(int $role): bool */ public function getPermission(int $roleKey): object { - if (is_null($this->userRole)) { + if ($this->userRole === null) { throw new RolesException("You need to specify the current users role with @setUserRole or the @constructer.", 1); } $this->validateRole($roleKey); diff --git a/composer.json b/composer.json index 27fee1d..34c104f 100755 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.0" + "php": ">=8.2" }, "autoload": { "psr-4": {