@@ -11,7 +11,7 @@ |
||
11 | 11 | #[Route('/page/<page>', name: 'page_get', methods: 'GET')] |
12 | 12 | public function get($page): string |
13 | 13 | { |
14 | - return 'page-' . $page; |
|
14 | + return 'page-'.$page; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | #[Route('/page/about', name: 'page_about', methods: 'GET', priority: -1)] |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function __construct( |
32 | 32 | private readonly TranslatorConfig $config, |
33 | 33 | private readonly CatalogueInterface $catalogue |
34 | - ) { |
|
34 | + ){ |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function registerMessage(string $domain, string $string, bool $resolveDomain = true): void |
41 | 41 | { |
42 | - if ($resolveDomain) { |
|
42 | + if ($resolveDomain){ |
|
43 | 43 | $domain = $this->config->resolveDomain($domain); |
44 | 44 | } |
45 | 45 | |
46 | 46 | //Automatically registering |
47 | - if (!$this->catalogue->has($domain, $string)) { |
|
47 | + if (!$this->catalogue->has($domain, $string)){ |
|
48 | 48 | $this->catalogue->set($domain, $string, $string); |
49 | 49 | } |
50 | 50 | |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function indexClasses(ScopedClassesInterface $locator): void |
62 | 62 | { |
63 | - foreach ($locator->getScopedClasses('translations', TranslatorTrait::class) as $class) { |
|
63 | + foreach ($locator->getScopedClasses('translations', TranslatorTrait::class) as $class){ |
|
64 | 64 | $strings = $this->fetchMessages($class, true); |
65 | - foreach ($strings as $string) { |
|
65 | + foreach ($strings as $string){ |
|
66 | 66 | $this->registerMessage($class->getName(), $string); |
67 | 67 | } |
68 | 68 | } |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | */ |
95 | 95 | private function registerInvocations(array $invocations): void |
96 | 96 | { |
97 | - foreach ($invocations as $invocation) { |
|
98 | - if ($invocation->getArgument(0)->getType() != ReflectionArgument::STRING) { |
|
97 | + foreach ($invocations as $invocation){ |
|
98 | + if ($invocation->getArgument(0)->getType() != ReflectionArgument::STRING){ |
|
99 | 99 | //We can only index invocations with constant string arguments |
100 | 100 | continue; |
101 | 101 | } |
@@ -114,20 +114,20 @@ discard block |
||
114 | 114 | { |
115 | 115 | $target = $reflection->getDefaultProperties() + $reflection->getConstants(); |
116 | 116 | |
117 | - foreach ($reflection->getProperties() as $property) { |
|
118 | - if (\is_string($property->getDocComment()) && \strpos($property->getDocComment(), '@do-not-index')) { |
|
117 | + foreach ($reflection->getProperties() as $property){ |
|
118 | + if (\is_string($property->getDocComment()) && \strpos($property->getDocComment(), '@do-not-index')){ |
|
119 | 119 | unset($target[$property->getName()]); |
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
123 | 123 | $strings = []; |
124 | 124 | \array_walk_recursive($target, function ($value) use (&$strings): void { |
125 | - if (\is_string($value) && Translator::isMessage($value)) { |
|
125 | + if (\is_string($value) && Translator::isMessage($value)){ |
|
126 | 126 | $strings[] = $this->prepareMessage($value); |
127 | 127 | } |
128 | 128 | }); |
129 | 129 | |
130 | - if ($inherit && $reflection->getParentClass()) { |
|
130 | + if ($inherit && $reflection->getParentClass()){ |
|
131 | 131 | //Joining strings data with parent class values (inheritance ON) - resolved into same |
132 | 132 | //domain on export |
133 | 133 | $strings = \array_merge( |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | //Translation using default bundle |
148 | 148 | $domain = $this->config->getDefaultDomain(); |
149 | 149 | |
150 | - if ($invocation->getName() === 'say') { |
|
150 | + if ($invocation->getName() === 'say'){ |
|
151 | 151 | //Let's try to confirm domain |
152 | 152 | $domain = $this->config->resolveDomain($invocation->getClass()); |
153 | 153 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | default => null |
160 | 160 | }; |
161 | 161 | |
162 | - if (!empty($argument) && $argument->getType() === ReflectionArgument::STRING) { |
|
162 | + if (!empty($argument) && $argument->getType() === ReflectionArgument::STRING){ |
|
163 | 163 | //Domain specified in arguments |
164 | 164 | $domain = $this->config->resolveDomain($argument->stringValue()); |
165 | 165 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | private function prepareMessage(string $string): string |
174 | 174 | { |
175 | - if (Translator::isMessage($string)) { |
|
175 | + if (Translator::isMessage($string)){ |
|
176 | 176 | $string = \substr($string, 2, -2); |
177 | 177 | } |
178 | 178 |
@@ -39,12 +39,14 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function registerMessage(string $domain, string $string, bool $resolveDomain = true): void |
41 | 41 | { |
42 | - if ($resolveDomain) { |
|
42 | + if ($resolveDomain) |
|
43 | + { |
|
43 | 44 | $domain = $this->config->resolveDomain($domain); |
44 | 45 | } |
45 | 46 | |
46 | 47 | //Automatically registering |
47 | - if (!$this->catalogue->has($domain, $string)) { |
|
48 | + if (!$this->catalogue->has($domain, $string)) |
|
49 | + { |
|
48 | 50 | $this->catalogue->set($domain, $string, $string); |
49 | 51 | } |
50 | 52 | |
@@ -60,9 +62,11 @@ discard block |
||
60 | 62 | */ |
61 | 63 | public function indexClasses(ScopedClassesInterface $locator): void |
62 | 64 | { |
63 | - foreach ($locator->getScopedClasses('translations', TranslatorTrait::class) as $class) { |
|
65 | + foreach ($locator->getScopedClasses('translations', TranslatorTrait::class) as $class) |
|
66 | + { |
|
64 | 67 | $strings = $this->fetchMessages($class, true); |
65 | - foreach ($strings as $string) { |
|
68 | + foreach ($strings as $string) |
|
69 | + { |
|
66 | 70 | $this->registerMessage($class->getName(), $string); |
67 | 71 | } |
68 | 72 | } |
@@ -94,8 +98,10 @@ discard block |
||
94 | 98 | */ |
95 | 99 | private function registerInvocations(array $invocations): void |
96 | 100 | { |
97 | - foreach ($invocations as $invocation) { |
|
98 | - if ($invocation->getArgument(0)->getType() != ReflectionArgument::STRING) { |
|
101 | + foreach ($invocations as $invocation) |
|
102 | + { |
|
103 | + if ($invocation->getArgument(0)->getType() != ReflectionArgument::STRING) |
|
104 | + { |
|
99 | 105 | //We can only index invocations with constant string arguments |
100 | 106 | continue; |
101 | 107 | } |
@@ -114,20 +120,24 @@ discard block |
||
114 | 120 | { |
115 | 121 | $target = $reflection->getDefaultProperties() + $reflection->getConstants(); |
116 | 122 | |
117 | - foreach ($reflection->getProperties() as $property) { |
|
118 | - if (\is_string($property->getDocComment()) && \strpos($property->getDocComment(), '@do-not-index')) { |
|
123 | + foreach ($reflection->getProperties() as $property) |
|
124 | + { |
|
125 | + if (\is_string($property->getDocComment()) && \strpos($property->getDocComment(), '@do-not-index')) |
|
126 | + { |
|
119 | 127 | unset($target[$property->getName()]); |
120 | 128 | } |
121 | 129 | } |
122 | 130 | |
123 | 131 | $strings = []; |
124 | 132 | \array_walk_recursive($target, function ($value) use (&$strings): void { |
125 | - if (\is_string($value) && Translator::isMessage($value)) { |
|
133 | + if (\is_string($value) && Translator::isMessage($value)) |
|
134 | + { |
|
126 | 135 | $strings[] = $this->prepareMessage($value); |
127 | 136 | } |
128 | 137 | }); |
129 | 138 | |
130 | - if ($inherit && $reflection->getParentClass()) { |
|
139 | + if ($inherit && $reflection->getParentClass()) |
|
140 | + { |
|
131 | 141 | //Joining strings data with parent class values (inheritance ON) - resolved into same |
132 | 142 | //domain on export |
133 | 143 | $strings = \array_merge( |
@@ -147,7 +157,8 @@ discard block |
||
147 | 157 | //Translation using default bundle |
148 | 158 | $domain = $this->config->getDefaultDomain(); |
149 | 159 | |
150 | - if ($invocation->getName() === 'say') { |
|
160 | + if ($invocation->getName() === 'say') |
|
161 | + { |
|
151 | 162 | //Let's try to confirm domain |
152 | 163 | $domain = $this->config->resolveDomain($invocation->getClass()); |
153 | 164 | } |
@@ -159,7 +170,8 @@ discard block |
||
159 | 170 | default => null |
160 | 171 | }; |
161 | 172 | |
162 | - if (!empty($argument) && $argument->getType() === ReflectionArgument::STRING) { |
|
173 | + if (!empty($argument) && $argument->getType() === ReflectionArgument::STRING) |
|
174 | + { |
|
163 | 175 | //Domain specified in arguments |
164 | 176 | $domain = $this->config->resolveDomain($argument->stringValue()); |
165 | 177 | } |
@@ -172,7 +184,8 @@ discard block |
||
172 | 184 | */ |
173 | 185 | private function prepareMessage(string $string): string |
174 | 186 | { |
175 | - if (Translator::isMessage($string)) { |
|
187 | + if (Translator::isMessage($string)) |
|
188 | + { |
|
176 | 189 | $string = \substr($string, 2, -2); |
177 | 190 | } |
178 | 191 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | use DestructorTrait; |
20 | 20 | |
21 | 21 | private State $state; |
22 | - private FactoryInterface|Factory $factory; |
|
22 | + private FactoryInterface | Factory $factory; |
|
23 | 23 | private Scope $scope; |
24 | 24 | |
25 | 25 | public function __construct(Registry $constructor) |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | * @throws ContainerException |
50 | 50 | * @throws \Throwable |
51 | 51 | */ |
52 | - public function get(string|Autowire $id, \Stringable|string|null $context = null): mixed |
|
52 | + public function get(string | Autowire $id, \Stringable | string | null $context = null): mixed |
|
53 | 53 | { |
54 | - if ($id instanceof Autowire) { |
|
54 | + if ($id instanceof Autowire){ |
|
55 | 55 | return $id->resolve($this->factory); |
56 | 56 | } |
57 | 57 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public function has(string $id): bool |
63 | 63 | { |
64 | - if (\array_key_exists($id, $this->state->bindings) || \array_key_exists($id, $this->state->singletons)) { |
|
64 | + if (\array_key_exists($id, $this->state->bindings) || \array_key_exists($id, $this->state->singletons)){ |
|
65 | 65 | return true; |
66 | 66 | } |
67 | 67 |
@@ -51,7 +51,8 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function get(string|Autowire $id, \Stringable|string|null $context = null): mixed |
53 | 53 | { |
54 | - if ($id instanceof Autowire) { |
|
54 | + if ($id instanceof Autowire) |
|
55 | + { |
|
55 | 56 | return $id->resolve($this->factory); |
56 | 57 | } |
57 | 58 | |
@@ -61,7 +62,8 @@ discard block |
||
61 | 62 | |
62 | 63 | public function has(string $id): bool |
63 | 64 | { |
64 | - if (\array_key_exists($id, $this->state->bindings) || \array_key_exists($id, $this->state->singletons)) { |
|
65 | + if (\array_key_exists($id, $this->state->bindings) || \array_key_exists($id, $this->state->singletons)) |
|
66 | + { |
|
65 | 67 | return true; |
66 | 68 | } |
67 | 69 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | public function __construct( |
29 | 29 | private readonly ListenerRegistryInterface $listenerRegistry |
30 | - ) { |
|
30 | + ){ |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function __invoke(LogEvent $event): void |
37 | 37 | { |
38 | - if (empty($this->output)) { |
|
38 | + if (empty($this->output)){ |
|
39 | 39 | return; |
40 | 40 | } |
41 | 41 | |
42 | - if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) { |
|
42 | + if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE){ |
|
43 | 43 | return; |
44 | 44 | } |
45 | 45 | |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | |
97 | 97 | private function getChannel(string $channel): string |
98 | 98 | { |
99 | - if (!\class_exists($channel, false)) { |
|
99 | + if (!\class_exists($channel, false)){ |
|
100 | 100 | return \sprintf('[%s]', $channel); |
101 | 101 | } |
102 | 102 | |
103 | - try { |
|
103 | + try{ |
|
104 | 104 | $reflection = new \ReflectionClass($channel); |
105 | - } catch (\ReflectionException) { |
|
105 | + }catch (\ReflectionException){ |
|
106 | 106 | return $channel; |
107 | 107 | } |
108 | 108 | |
@@ -111,10 +111,10 @@ discard block |
||
111 | 111 | |
112 | 112 | private function getMessage(bool $decorated, string $message): string |
113 | 113 | { |
114 | - if (!$decorated) { |
|
114 | + if (!$decorated){ |
|
115 | 115 | return $message; |
116 | 116 | } |
117 | 117 | |
118 | - return Color::GRAY . $message . Color::RESET; |
|
118 | + return Color::GRAY.$message.Color::RESET; |
|
119 | 119 | } |
120 | 120 | } |
@@ -35,11 +35,13 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function __invoke(LogEvent $event): void |
37 | 37 | { |
38 | - if (empty($this->output)) { |
|
38 | + if (empty($this->output)) |
|
39 | + { |
|
39 | 40 | return; |
40 | 41 | } |
41 | 42 | |
42 | - if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) { |
|
43 | + if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) |
|
44 | + { |
|
43 | 45 | return; |
44 | 46 | } |
45 | 47 | |
@@ -96,13 +98,17 @@ discard block |
||
96 | 98 | |
97 | 99 | private function getChannel(string $channel): string |
98 | 100 | { |
99 | - if (!\class_exists($channel, false)) { |
|
101 | + if (!\class_exists($channel, false)) |
|
102 | + { |
|
100 | 103 | return \sprintf('[%s]', $channel); |
101 | 104 | } |
102 | 105 | |
103 | - try { |
|
106 | + try |
|
107 | + { |
|
104 | 108 | $reflection = new \ReflectionClass($channel); |
105 | - } catch (\ReflectionException) { |
|
109 | + } |
|
110 | + catch (\ReflectionException) |
|
111 | + { |
|
106 | 112 | return $channel; |
107 | 113 | } |
108 | 114 | |
@@ -111,7 +117,8 @@ discard block |
||
111 | 117 | |
112 | 118 | private function getMessage(bool $decorated, string $message): string |
113 | 119 | { |
114 | - if (!$decorated) { |
|
120 | + if (!$decorated) |
|
121 | + { |
|
115 | 122 | return $message; |
116 | 123 | } |
117 | 124 |
@@ -32,35 +32,35 @@ |
||
32 | 32 | $available = $config->getDeclarations(); |
33 | 33 | |
34 | 34 | $i = 0; |
35 | - foreach ($available as $name) { |
|
36 | - $command = 'create:' . $name; |
|
35 | + foreach ($available as $name){ |
|
36 | + $command = 'create:'.$name; |
|
37 | 37 | |
38 | - if (!$console->getApplication()->has($command)) { |
|
38 | + if (!$console->getApplication()->has($command)){ |
|
39 | 39 | continue; |
40 | 40 | } |
41 | 41 | |
42 | 42 | $command = $console->getApplication()->get($command); |
43 | 43 | |
44 | - if ($i > 0) { |
|
44 | + if ($i > 0){ |
|
45 | 45 | $table->addRow(new TableSeparator()); |
46 | 46 | } |
47 | 47 | $declaration = $config->getDeclaration($name); |
48 | 48 | |
49 | 49 | $options = []; |
50 | - foreach ($declaration['options'] ?? [] as $key => $value) { |
|
51 | - $options[] = $key . ': <fg=yellow>' . \json_encode(\str_replace($rootDir, '', $value)) . '</>'; |
|
50 | + foreach ($declaration['options'] ?? [] as $key => $value){ |
|
51 | + $options[] = $key.': <fg=yellow>'.\json_encode(\str_replace($rootDir, '', $value)).'</>'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $file = \str_replace($rootDir, '', $config->classFilename($name, $this->name)); |
55 | 55 | $namespace = $config->classNamespace($name, $this->name); |
56 | 56 | $table->addRow([ |
57 | - $command->getName() . "\n<fg=gray>{$command->getDescription()}</>", |
|
57 | + $command->getName()."\n<fg=gray>{$command->getDescription()}</>", |
|
58 | 58 | <<<TARGET |
59 | 59 | path: <fg=green>/$file</> |
60 | 60 | namespace: <fg=yellow>$namespace</> |
61 | 61 | TARGET |
62 | 62 | . |
63 | - ($options !== [] ? "\n" . \implode("\n", $options) : ''), |
|
63 | + ($options !== [] ? "\n".\implode("\n", $options) : ''), |
|
64 | 64 | ]); |
65 | 65 | |
66 | 66 | $i++; |
@@ -32,22 +32,26 @@ |
||
32 | 32 | $available = $config->getDeclarations(); |
33 | 33 | |
34 | 34 | $i = 0; |
35 | - foreach ($available as $name) { |
|
35 | + foreach ($available as $name) |
|
36 | + { |
|
36 | 37 | $command = 'create:' . $name; |
37 | 38 | |
38 | - if (!$console->getApplication()->has($command)) { |
|
39 | + if (!$console->getApplication()->has($command)) |
|
40 | + { |
|
39 | 41 | continue; |
40 | 42 | } |
41 | 43 | |
42 | 44 | $command = $console->getApplication()->get($command); |
43 | 45 | |
44 | - if ($i > 0) { |
|
46 | + if ($i > 0) |
|
47 | + { |
|
45 | 48 | $table->addRow(new TableSeparator()); |
46 | 49 | } |
47 | 50 | $declaration = $config->getDeclaration($name); |
48 | 51 | |
49 | 52 | $options = []; |
50 | - foreach ($declaration['options'] ?? [] as $key => $value) { |
|
53 | + foreach ($declaration['options'] ?? [] as $key => $value) |
|
54 | + { |
|
51 | 55 | $options[] = $key . ': <fg=yellow>' . \json_encode(\str_replace($rootDir, '', $value)) . '</>'; |
52 | 56 | } |
53 | 57 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | <<<TARGET |
59 | 59 | path: <fg=green>/$file</> |
60 | 60 | namespace: <fg=yellow>$namespace</> |
61 | -TARGET |
|
61 | +target |
|
62 | 62 | . |
63 | 63 | ($options !== [] ? "\n" . \implode("\n", $options) : ''), |
64 | 64 | ]); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function __construct( |
20 | 20 | private readonly ?string $scopeName = null, |
21 | - ) { |
|
21 | + ){ |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function getScopeName(): ?string |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | $this->parentFactory = $factory; |
39 | 39 | |
40 | 40 | // Check a scope with the same name is not already registered |
41 | - if ($this->scopeName !== null) { |
|
41 | + if ($this->scopeName !== null){ |
|
42 | 42 | $tmp = $this; |
43 | - while ($tmp->parentScope !== null) { |
|
43 | + while ($tmp->parentScope !== null){ |
|
44 | 44 | $tmp = $tmp->parentScope; |
45 | 45 | $tmp->scopeName !== $this->scopeName ?: throw new NamedScopeDuplicationException($this->scopeName); |
46 | 46 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $result = [$this->scopeName]; |
69 | 69 | |
70 | 70 | $parent = $this; |
71 | - while ($parent->parentScope !== null) { |
|
71 | + while ($parent->parentScope !== null){ |
|
72 | 72 | $parent = $parent->parentScope; |
73 | 73 | $result[] = $parent->scopeName; |
74 | 74 | } |
@@ -38,9 +38,11 @@ discard block |
||
38 | 38 | $this->parentFactory = $factory; |
39 | 39 | |
40 | 40 | // Check a scope with the same name is not already registered |
41 | - if ($this->scopeName !== null) { |
|
41 | + if ($this->scopeName !== null) |
|
42 | + { |
|
42 | 43 | $tmp = $this; |
43 | - while ($tmp->parentScope !== null) { |
|
44 | + while ($tmp->parentScope !== null) |
|
45 | + { |
|
44 | 46 | $tmp = $tmp->parentScope; |
45 | 47 | $tmp->scopeName !== $this->scopeName ?: throw new NamedScopeDuplicationException($this->scopeName); |
46 | 48 | } |
@@ -68,7 +70,8 @@ discard block |
||
68 | 70 | $result = [$this->scopeName]; |
69 | 71 | |
70 | 72 | $parent = $this; |
71 | - while ($parent->parentScope !== null) { |
|
73 | + while ($parent->parentScope !== null) |
|
74 | + { |
|
72 | 75 | $parent = $parent->parentScope; |
73 | 76 | $result[] = $parent->scopeName; |
74 | 77 | } |
@@ -12,11 +12,11 @@ |
||
12 | 12 | public function __construct( |
13 | 13 | string $interface, |
14 | 14 | bool $singleton = false, |
15 | - private readonly string|\BackedEnum|null $scope = null, |
|
15 | + private readonly string | \BackedEnum | null $scope = null, |
|
16 | 16 | private readonly ?string $version = null, |
17 | 17 | private readonly ?string $message = null, |
18 | - ) { |
|
19 | - if (($scope === null || $version === null) && $message === null) { |
|
18 | + ){ |
|
19 | + if (($scope === null || $version === null) && $message === null){ |
|
20 | 20 | throw new \InvalidArgumentException('Scope and version or custom message must be provided.'); |
21 | 21 | } |
22 | 22 |
@@ -16,7 +16,8 @@ |
||
16 | 16 | private readonly ?string $version = null, |
17 | 17 | private readonly ?string $message = null, |
18 | 18 | ) { |
19 | - if (($scope === null || $version === null) && $message === null) { |
|
19 | + if (($scope === null || $version === null) && $message === null) |
|
20 | + { |
|
20 | 21 | throw new \InvalidArgumentException('Scope and version or custom message must be provided.'); |
21 | 22 | } |
22 | 23 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $option->checkScope = true; |
32 | 32 | yield [$option]; |
33 | 33 | |
34 | - $option = new class extends Options { |
|
34 | + $option = new class extends Options{ |
|
35 | 35 | public int $customOption = 3; |
36 | 36 | }; |
37 | 37 | $option->customOption = 5; |
@@ -31,7 +31,8 @@ |
||
31 | 31 | $option->checkScope = true; |
32 | 32 | yield [$option]; |
33 | 33 | |
34 | - $option = new class extends Options { |
|
34 | + $option = new class extends Options |
|
35 | + { |
|
35 | 36 | public int $customOption = 3; |
36 | 37 | }; |
37 | 38 | $option->customOption = 5; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | public function __construct( |
33 | 33 | public PublicContainer $publicContainer, |
34 | - ) { |
|
34 | + ){ |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function __get(string $name): object |