@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | private readonly PermissionsInterface $permissions, |
23 | 23 | #[Proxy] private readonly ContainerInterface $container, |
24 | 24 | private array $roles = [] |
25 | - ) { |
|
25 | + ){ |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | public function allows(string $permission, array $context = []): bool |
32 | 32 | { |
33 | 33 | $allows = false; |
34 | - foreach ($this->getRoles() as $role) { |
|
35 | - if (!$this->permissions->hasRole($role)) { |
|
34 | + foreach ($this->getRoles() as $role){ |
|
35 | + if (!$this->permissions->hasRole($role)){ |
|
36 | 36 | continue; |
37 | 37 | } |
38 | 38 | |
@@ -72,13 +72,13 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function getActor(): ActorInterface |
74 | 74 | { |
75 | - if (!\is_null($this->actor)) { |
|
75 | + if (!\is_null($this->actor)){ |
|
76 | 76 | return $this->actor; |
77 | 77 | } |
78 | 78 | |
79 | - try { |
|
79 | + try{ |
|
80 | 80 | return $this->container->get(ActorInterface::class); |
81 | - } catch (NotFoundExceptionInterface $e) { |
|
81 | + }catch (NotFoundExceptionInterface $e){ |
|
82 | 82 | throw new ScopeException('Unable to resolve Actor from the scope', $e->getCode(), $e); |
83 | 83 | } |
84 | 84 | } |