@@ -15,13 +15,13 @@ |
||
15 | 15 | public function __construct( |
16 | 16 | private readonly ContainerInterface $container, |
17 | 17 | private readonly EnvironmentInterface $env, |
18 | - ) {} |
|
18 | + ){} |
|
19 | 19 | |
20 | 20 | public function populate(StateInterface $state): void |
21 | 21 | { |
22 | 22 | $state->setTag('php', \phpversion()); |
23 | 23 | |
24 | - if ($this->container->has(DispatcherInterface::class)) { |
|
24 | + if ($this->container->has(DispatcherInterface::class)){ |
|
25 | 25 | $state->setTag('dispatcher', $this->container->get(DispatcherInterface::class)::class); |
26 | 26 | } |
27 | 27 |
@@ -15,13 +15,15 @@ |
||
15 | 15 | public function __construct( |
16 | 16 | private readonly ContainerInterface $container, |
17 | 17 | private readonly EnvironmentInterface $env, |
18 | - ) {} |
|
18 | + ) { |
|
19 | +} |
|
19 | 20 | |
20 | 21 | public function populate(StateInterface $state): void |
21 | 22 | { |
22 | 23 | $state->setTag('php', \phpversion()); |
23 | 24 | |
24 | - if ($this->container->has(DispatcherInterface::class)) { |
|
25 | + if ($this->container->has(DispatcherInterface::class)) |
|
26 | + { |
|
25 | 27 | $state->setTag('dispatcher', $this->container->get(DispatcherInterface::class)::class); |
26 | 28 | } |
27 | 29 |
@@ -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 | * @throws ScopeException |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | public function allows(string $permission, array $context = []): bool |
31 | 31 | { |
32 | 32 | $allows = false; |
33 | - foreach ($this->getRoles() as $role) { |
|
34 | - if (!$this->permissions->hasRole($role)) { |
|
33 | + foreach ($this->getRoles() as $role){ |
|
34 | + if (!$this->permissions->hasRole($role)){ |
|
35 | 35 | continue; |
36 | 36 | } |
37 | 37 | |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function getActor(): ActorInterface |
73 | 73 | { |
74 | - if (!\is_null($this->actor)) { |
|
74 | + if (!\is_null($this->actor)){ |
|
75 | 75 | return $this->actor; |
76 | 76 | } |
77 | 77 | |
78 | - try { |
|
78 | + try{ |
|
79 | 79 | return $this->container->get(ActorInterface::class); |
80 | - } catch (NotFoundExceptionInterface $e) { |
|
80 | + }catch (NotFoundExceptionInterface $e){ |
|
81 | 81 | throw new ScopeException('Unable to resolve Actor from the scope', $e->getCode(), $e); |
82 | 82 | } |
83 | 83 | } |
@@ -22,7 +22,8 @@ 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 | 29 | * @throws ScopeException |
@@ -30,8 +31,10 @@ discard block |
||
30 | 31 | public function allows(string $permission, array $context = []): bool |
31 | 32 | { |
32 | 33 | $allows = false; |
33 | - foreach ($this->getRoles() as $role) { |
|
34 | - if (!$this->permissions->hasRole($role)) { |
|
34 | + foreach ($this->getRoles() as $role) |
|
35 | + { |
|
36 | + if (!$this->permissions->hasRole($role)) |
|
37 | + { |
|
35 | 38 | continue; |
36 | 39 | } |
37 | 40 | |
@@ -71,13 +74,17 @@ discard block |
||
71 | 74 | */ |
72 | 75 | public function getActor(): ActorInterface |
73 | 76 | { |
74 | - if (!\is_null($this->actor)) { |
|
77 | + if (!\is_null($this->actor)) |
|
78 | + { |
|
75 | 79 | return $this->actor; |
76 | 80 | } |
77 | 81 | |
78 | - try { |
|
82 | + try |
|
83 | + { |
|
79 | 84 | return $this->container->get(ActorInterface::class); |
80 | - } catch (NotFoundExceptionInterface $e) { |
|
85 | + } |
|
86 | + catch (NotFoundExceptionInterface $e) |
|
87 | + { |
|
81 | 88 | throw new ScopeException('Unable to resolve Actor from the scope', $e->getCode(), $e); |
82 | 89 | } |
83 | 90 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private readonly MemoryInterface $memory, |
14 | - ) {} |
|
14 | + ){} |
|
15 | 15 | |
16 | 16 | public function setLocales(?array $locales): void |
17 | 17 | { |
@@ -11,7 +11,8 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private readonly MemoryInterface $memory, |
14 | - ) {} |
|
14 | + ) { |
|
15 | +} |
|
15 | 16 | |
16 | 17 | public function setLocales(?array $locales): void |
17 | 18 | { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public function __construct( |
21 | 21 | private readonly TranslatorInterface $translator, |
22 | - ) {} |
|
22 | + ){} |
|
23 | 23 | |
24 | 24 | public function process(ViewSource $source, ContextInterface $context): ViewSource |
25 | 25 | { |
@@ -19,7 +19,8 @@ |
||
19 | 19 | |
20 | 20 | public function __construct( |
21 | 21 | private readonly TranslatorInterface $translator, |
22 | - ) {} |
|
22 | + ) { |
|
23 | +} |
|
23 | 24 | |
24 | 25 | public function process(ViewSource $source, ContextInterface $context): ViewSource |
25 | 26 | { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | public function __construct( |
20 | 20 | private readonly TranslatorInterface $translator, |
21 | - ) { |
|
21 | + ){ |
|
22 | 22 | $this->locales = $translator->getCatalogueManager()->getLocales(); |
23 | 23 | } |
24 | 24 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | public function __construct( |
14 | 14 | private readonly ResponseWrapper $wrapper, |
15 | - ) {} |
|
15 | + ){} |
|
16 | 16 | |
17 | 17 | public function render(array $errors, mixed $context = null): ResponseInterface |
18 | 18 | { |
@@ -12,7 +12,8 @@ |
||
12 | 12 | { |
13 | 13 | public function __construct( |
14 | 14 | private readonly ResponseWrapper $wrapper, |
15 | - ) {} |
|
15 | + ) { |
|
16 | +} |
|
16 | 17 | |
17 | 18 | public function render(array $errors, mixed $context = null): ResponseInterface |
18 | 19 | { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | public function __construct( |
20 | 20 | private InputManager $input, |
21 | - ) {} |
|
21 | + ){} |
|
22 | 22 | |
23 | 23 | public function withPrefix(string $prefix, bool $add = true): InputInterface |
24 | 24 | { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | public function getValue(string $source, mixed $name = null): mixed |
32 | 32 | { |
33 | - if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)) { |
|
33 | + if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)){ |
|
34 | 34 | throw new InputException(\sprintf('Undefined input source %s', $source)); |
35 | 35 | } |
36 | 36 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function hasValue(string $source, string $name): bool |
41 | 41 | { |
42 | - if (!$this->input->hasBag($source)) { |
|
42 | + if (!$this->input->hasBag($source)){ |
|
43 | 43 | return false; |
44 | 44 | } |
45 | 45 |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | { |
19 | 19 | public function __construct( |
20 | 20 | private InputManager $input, |
21 | - ) {} |
|
21 | + ) { |
|
22 | +} |
|
22 | 23 | |
23 | 24 | public function withPrefix(string $prefix, bool $add = true): InputInterface |
24 | 25 | { |
@@ -30,7 +31,8 @@ discard block |
||
30 | 31 | |
31 | 32 | public function getValue(string $source, mixed $name = null): mixed |
32 | 33 | { |
33 | - if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)) { |
|
34 | + if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)) |
|
35 | + { |
|
34 | 36 | throw new InputException(\sprintf('Undefined input source %s', $source)); |
35 | 37 | } |
36 | 38 | |
@@ -39,7 +41,8 @@ discard block |
||
39 | 41 | |
40 | 42 | public function hasValue(string $source, string $name): bool |
41 | 43 | { |
42 | - if (!$this->input->hasBag($source)) { |
|
44 | + if (!$this->input->hasBag($source)) |
|
45 | + { |
|
43 | 46 | return false; |
44 | 47 | } |
45 | 48 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private FileSnapshot $fileSnapshot, |
14 | - ) {} |
|
14 | + ){} |
|
15 | 15 | |
16 | 16 | public function report(\Throwable $exception): void |
17 | 17 | { |
@@ -11,7 +11,8 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private FileSnapshot $fileSnapshot, |
14 | - ) {} |
|
14 | + ) { |
|
15 | +} |
|
15 | 16 | |
16 | 17 | public function report(\Throwable $exception): void |
17 | 18 | { |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private StorageSnapshot $storageSnapshot, |
14 | - ) {} |
|
14 | + ){} |
|
15 | 15 | |
16 | 16 | public function report(\Throwable $exception): void |
17 | 17 | { |
@@ -11,7 +11,8 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private StorageSnapshot $storageSnapshot, |
14 | - ) {} |
|
14 | + ) { |
|
15 | +} |
|
15 | 16 | |
16 | 17 | public function report(\Throwable $exception): void |
17 | 18 | { |