Replace InvalidStateException usages with InvalidArgument or LogicException

This commit is contained in:
Dylan K. Taylor
2021-11-02 16:05:54 +00:00
parent 4eef458d29
commit e34364412b
15 changed files with 24 additions and 30 deletions

View File

@@ -146,7 +146,7 @@ class PermissibleInternal implements Permissible{
foreach($this->rootPermissions as $name => $isGranted){
$perm = $permManager->getPermission($name);
if($perm === null){
throw new \InvalidStateException("Unregistered root permission $name");
throw new \LogicException("Unregistered root permission $name");
}
$this->permissions[$name] = new PermissionAttachmentInfo($name, null, $isGranted, null);
$permManager->subscribeToPermission($name, $this);