@@ -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; |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | public readonly string $name; |
| 16 | 16 | |
| 17 | - public function __construct(string|\BackedEnum $name) |
|
| 17 | + public function __construct(string | \BackedEnum $name) |
|
| 18 | 18 | { |
| 19 | - $this->name = \is_object($name) ? (string) $name->value : $name; |
|
| 19 | + $this->name = \is_object($name) ? (string)$name->value : $name; |
|
| 20 | 20 | } |
| 21 | 21 | } |
@@ -89,9 +89,12 @@ discard block |
||
| 89 | 89 | new ExceptionInterceptor(), |
| 90 | 90 | ], self::createMock(CoreInterface::class)); |
| 91 | 91 | |
| 92 | - try { |
|
| 92 | + try |
|
| 93 | + { |
|
| 93 | 94 | $pipeline->callAction('controller', 'action'); |
| 94 | - } catch (\RuntimeException) { |
|
| 95 | + } |
|
| 96 | + catch (\RuntimeException) |
|
| 97 | + { |
|
| 95 | 98 | // Attributes won't be lost after legacy interceptor |
| 96 | 99 | self::assertSame(['key' => 'value'], $state->context->getAttributes()); |
| 97 | 100 | } |
@@ -111,7 +114,8 @@ discard block |
||
| 111 | 114 | $lastHandler instanceof CoreInterface and $pipeline = $pipeline->withCore($lastHandler); |
| 112 | 115 | $lastHandler instanceof HandlerInterface and $pipeline = $pipeline->withHandler($lastHandler); |
| 113 | 116 | |
| 114 | - foreach ($interceptors as $interceptor) { |
|
| 117 | + foreach ($interceptors as $interceptor) |
|
| 118 | + { |
|
| 115 | 119 | $pipeline->addInterceptor($interceptor); |
| 116 | 120 | } |
| 117 | 121 | |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | new ExceptionInterceptor(), |
| 92 | 92 | ], self::createMock(CoreInterface::class)); |
| 93 | 93 | |
| 94 | - try { |
|
| 94 | + try{ |
|
| 95 | 95 | $pipeline->callAction('controller', 'action'); |
| 96 | - } catch (\RuntimeException) { |
|
| 96 | + }catch (\RuntimeException){ |
|
| 97 | 97 | // Attributes won't be lost after legacy interceptor |
| 98 | 98 | self::assertSame(['key' => 'value'], $state->context->getAttributes()); |
| 99 | 99 | } |
@@ -124,15 +124,15 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | private function createPipeline( |
| 126 | 126 | array $interceptors = [], |
| 127 | - CoreInterface|HandlerInterface|null $lastHandler = null, |
|
| 128 | - EventDispatcherInterface|null $dispatcher = null, |
|
| 127 | + CoreInterface | HandlerInterface | null $lastHandler = null, |
|
| 128 | + EventDispatcherInterface | null $dispatcher = null, |
|
| 129 | 129 | ): InterceptorPipeline { |
| 130 | 130 | $pipeline = new InterceptorPipeline($dispatcher); |
| 131 | 131 | |
| 132 | 132 | $lastHandler instanceof CoreInterface and $pipeline = $pipeline->withCore($lastHandler); |
| 133 | 133 | $lastHandler instanceof HandlerInterface and $pipeline = $pipeline->withHandler($lastHandler); |
| 134 | 134 | |
| 135 | - foreach ($interceptors as $interceptor) { |
|
| 135 | + foreach ($interceptors as $interceptor){ |
|
| 136 | 136 | $pipeline->addInterceptor($interceptor); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public function handle(Parser $parser, Assembler $asm, Token $token): void |
| 25 | 25 | { |
| 26 | - switch ($token->type) { |
|
| 26 | + switch ($token->type){ |
|
| 27 | 27 | case DynamicGrammar::TYPE_DIRECTIVE: |
| 28 | 28 | $this->directive = new Directive(new Parser\Context($token, $parser->getPath())); |
| 29 | 29 | $asm->push($this->directive); |
@@ -48,20 +48,20 @@ discard block |
||
| 48 | 48 | break; |
| 49 | 49 | |
| 50 | 50 | case DynamicGrammar::TYPE_KEYWORD: |
| 51 | - if ($this->directive !== null) { |
|
| 51 | + if ($this->directive !== null){ |
|
| 52 | 52 | $this->directive->name = $token->content; |
| 53 | 53 | } |
| 54 | 54 | break; |
| 55 | 55 | |
| 56 | 56 | case DynamicGrammar::TYPE_BODY: |
| 57 | - if ($this->directive !== null) { |
|
| 57 | + if ($this->directive !== null){ |
|
| 58 | 58 | $this->directive->body = $token->content; |
| 59 | 59 | $this->directive->values = $this->fetchValues($this->directive->body); |
| 60 | 60 | |
| 61 | 61 | $this->directive = null; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - if ($this->output !== null) { |
|
| 64 | + if ($this->output !== null){ |
|
| 65 | 65 | $this->output->body = $token->content; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -79,31 +79,31 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | $src = new StringStream($body); |
| 81 | 81 | |
| 82 | - while ($n = $src->peak()) { |
|
| 83 | - if (\in_array($n, ['"', "'"], true)) { |
|
| 82 | + while ($n = $src->peak()){ |
|
| 83 | + if (\in_array($n, ['"', "'"], true)){ |
|
| 84 | 84 | $values[\count($values) - 1] .= $n; |
| 85 | - while (($nn = $src->peak()) !== null) { |
|
| 85 | + while (($nn = $src->peak()) !== null){ |
|
| 86 | 86 | $values[\count($values) - 1] .= $nn; |
| 87 | - if ($nn === $n) { |
|
| 87 | + if ($nn === $n){ |
|
| 88 | 88 | break; |
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | continue; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if ($n === ',' && $level === 0) { |
|
| 94 | + if ($n === ',' && $level === 0){ |
|
| 95 | 95 | $values[] = ''; |
| 96 | 96 | continue; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $values[\count($values) - 1] .= $n; |
| 100 | 100 | |
| 101 | - if ($n === '(' || $n === '[' || $n === '{') { |
|
| 101 | + if ($n === '(' || $n === '[' || $n === '{'){ |
|
| 102 | 102 | $level++; |
| 103 | 103 | continue; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if ($n === ')' || $n === ']' || $n === '}') { |
|
| 106 | + if ($n === ')' || $n === ']' || $n === '}'){ |
|
| 107 | 107 | $level--; |
| 108 | 108 | } |
| 109 | 109 | } |
@@ -23,7 +23,8 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public function handle(Parser $parser, Assembler $asm, Token $token): void |
| 25 | 25 | { |
| 26 | - switch ($token->type) { |
|
| 26 | + switch ($token->type) |
|
| 27 | + { |
|
| 27 | 28 | case DynamicGrammar::TYPE_DIRECTIVE: |
| 28 | 29 | $this->directive = new Directive(new Parser\Context($token, $parser->getPath())); |
| 29 | 30 | $asm->push($this->directive); |
@@ -48,20 +49,23 @@ discard block |
||
| 48 | 49 | break; |
| 49 | 50 | |
| 50 | 51 | case DynamicGrammar::TYPE_KEYWORD: |
| 51 | - if ($this->directive !== null) { |
|
| 52 | + if ($this->directive !== null) |
|
| 53 | + { |
|
| 52 | 54 | $this->directive->name = $token->content; |
| 53 | 55 | } |
| 54 | 56 | break; |
| 55 | 57 | |
| 56 | 58 | case DynamicGrammar::TYPE_BODY: |
| 57 | - if ($this->directive !== null) { |
|
| 59 | + if ($this->directive !== null) |
|
| 60 | + { |
|
| 58 | 61 | $this->directive->body = $token->content; |
| 59 | 62 | $this->directive->values = $this->fetchValues($this->directive->body); |
| 60 | 63 | |
| 61 | 64 | $this->directive = null; |
| 62 | 65 | } |
| 63 | 66 | |
| 64 | - if ($this->output !== null) { |
|
| 67 | + if ($this->output !== null) |
|
| 68 | + { |
|
| 65 | 69 | $this->output->body = $token->content; |
| 66 | 70 | } |
| 67 | 71 | |
@@ -79,31 +83,38 @@ discard block |
||
| 79 | 83 | |
| 80 | 84 | $src = new StringStream($body); |
| 81 | 85 | |
| 82 | - while ($n = $src->peak()) { |
|
| 83 | - if (\in_array($n, ['"', "'"], true)) { |
|
| 86 | + while ($n = $src->peak()) |
|
| 87 | + { |
|
| 88 | + if (\in_array($n, ['"', "'"], true)) |
|
| 89 | + { |
|
| 84 | 90 | $values[\count($values) - 1] .= $n; |
| 85 | - while (($nn = $src->peak()) !== null) { |
|
| 91 | + while (($nn = $src->peak()) !== null) |
|
| 92 | + { |
|
| 86 | 93 | $values[\count($values) - 1] .= $nn; |
| 87 | - if ($nn === $n) { |
|
| 94 | + if ($nn === $n) |
|
| 95 | + { |
|
| 88 | 96 | break; |
| 89 | 97 | } |
| 90 | 98 | } |
| 91 | 99 | continue; |
| 92 | 100 | } |
| 93 | 101 | |
| 94 | - if ($n === ',' && $level === 0) { |
|
| 102 | + if ($n === ',' && $level === 0) |
|
| 103 | + { |
|
| 95 | 104 | $values[] = ''; |
| 96 | 105 | continue; |
| 97 | 106 | } |
| 98 | 107 | |
| 99 | 108 | $values[\count($values) - 1] .= $n; |
| 100 | 109 | |
| 101 | - if ($n === '(' || $n === '[' || $n === '{') { |
|
| 110 | + if ($n === '(' || $n === '[' || $n === '{') |
|
| 111 | + { |
|
| 102 | 112 | $level++; |
| 103 | 113 | continue; |
| 104 | 114 | } |
| 105 | 115 | |
| 106 | - if ($n === ')' || $n === ']' || $n === '}') { |
|
| 116 | + if ($n === ')' || $n === ']' || $n === '}') |
|
| 117 | + { |
|
| 107 | 118 | $level--; |
| 108 | 119 | } |
| 109 | 120 | } |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | private readonly bool $isLegacy; |
| 22 | 22 | |
| 23 | 23 | public function __construct( |
| 24 | - private readonly CoreInterface|InterceptorHandler $core, |
|
| 25 | - ) { |
|
| 24 | + private readonly CoreInterface | InterceptorHandler $core, |
|
| 25 | + ){ |
|
| 26 | 26 | $this->isLegacy = !$core instanceof HandlerInterface; |
| 27 | 27 | } |
| 28 | 28 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | ?string $comment = null, |
| 24 | 24 | ?string $namespace = null, |
| 25 | 25 | private readonly bool $isDomain = false, |
| 26 | - ) { |
|
| 26 | + ){ |
|
| 27 | 27 | parent::__construct($config, $name, $comment, $namespace); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $this->class->addConstant('SINGLETONS', [])->setProtected(); |
| 44 | 44 | $this->class->addConstant('DEPENDENCIES', [])->setProtected(); |
| 45 | 45 | |
| 46 | - if ($this->isDomain) { |
|
| 46 | + if ($this->isDomain){ |
|
| 47 | 47 | $this->class->addConstant('INTERCEPTORS', [])->setProtected(); |
| 48 | 48 | $this->namespace->addUse(HandlerInterface::class); |
| 49 | 49 | $this->class->getConstant('SINGLETONS')->setValue([ |
@@ -43,7 +43,8 @@ |
||
| 43 | 43 | $this->class->addConstant('SINGLETONS', [])->setProtected(); |
| 44 | 44 | $this->class->addConstant('DEPENDENCIES', [])->setProtected(); |
| 45 | 45 | |
| 46 | - if ($this->isDomain) { |
|
| 46 | + if ($this->isDomain) |
|
| 47 | + { |
|
| 47 | 48 | $this->class->addConstant('INTERCEPTORS', [])->setProtected(); |
| 48 | 49 | $this->namespace->addUse(HandlerInterface::class); |
| 49 | 50 | $this->class->getConstant('SINGLETONS')->setValue([ |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | public function defineDirectories(string $root): array |
| 30 | 30 | { |
| 31 | - return \array_merge(parent::defineDirectories($root), ['app' => $root . '/App']); |
|
| 31 | + return \array_merge(parent::defineDirectories($root), ['app' => $root.'/App']); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | protected function tearDown(): void |
@@ -28,8 +28,10 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | $grid = $this->table(['Name:', 'Verbs:', 'Pattern:', 'Target:', 'Group:']); |
| 30 | 30 | |
| 31 | - foreach ($router->getRoutes() as $name => $route) { |
|
| 32 | - if ($route instanceof RouteInterface) { |
|
| 31 | + foreach ($router->getRoutes() as $name => $route) |
|
| 32 | + { |
|
| 33 | + if ($route instanceof RouteInterface) |
|
| 34 | + { |
|
| 33 | 35 | $grid->addRow( |
| 34 | 36 | [ |
| 35 | 37 | $name, |
@@ -53,8 +55,10 @@ discard block |
||
| 53 | 55 | private function getRouteGroups(GroupRegistry $registry, string $routeName): array |
| 54 | 56 | { |
| 55 | 57 | $groups = []; |
| 56 | - foreach ($registry as $groupName => $group) { |
|
| 57 | - if ($group->hasRoute($routeName)) { |
|
| 58 | + foreach ($registry as $groupName => $group) |
|
| 59 | + { |
|
| 60 | + if ($group->hasRoute($routeName)) |
|
| 61 | + { |
|
| 58 | 62 | $groups[] = $groupName; |
| 59 | 63 | } |
| 60 | 64 | } |
@@ -64,12 +68,14 @@ discard block |
||
| 64 | 68 | |
| 65 | 69 | private function getVerbs(RouteInterface $route): string |
| 66 | 70 | { |
| 67 | - if ($route->getVerbs() === RouteInterface::VERBS) { |
|
| 71 | + if ($route->getVerbs() === RouteInterface::VERBS) |
|
| 72 | + { |
|
| 68 | 73 | return '*'; |
| 69 | 74 | } |
| 70 | 75 | |
| 71 | 76 | $result = []; |
| 72 | - foreach ($route->getVerbs() as $verb) { |
|
| 77 | + foreach ($route->getVerbs() as $verb) |
|
| 78 | + { |
|
| 73 | 79 | $result[] = match (\strtolower($verb)) { |
| 74 | 80 | 'get' => '<fg=green>GET</>', |
| 75 | 81 | 'head' => '<fg=bright-green>HEAD</>', |
@@ -111,7 +117,8 @@ discard block |
||
| 111 | 117 | private function getTarget(RouteInterface $route, KernelInterface $kernel): string |
| 112 | 118 | { |
| 113 | 119 | $target = $this->getValue($route, 'target'); |
| 114 | - switch (true) { |
|
| 120 | + switch (true) |
|
| 121 | + { |
|
| 115 | 122 | case $target instanceof \Closure: |
| 116 | 123 | $reflection = new \ReflectionFunction($target); |
| 117 | 124 | |
@@ -136,7 +143,8 @@ discard block |
||
| 136 | 143 | |
| 137 | 144 | case $target instanceof Group: |
| 138 | 145 | $result = []; |
| 139 | - foreach ($this->getValue($target, 'controllers') as $alias => $class) { |
|
| 146 | + foreach ($this->getValue($target, 'controllers') as $alias => $class) |
|
| 147 | + { |
|
| 140 | 148 | $result[] = \sprintf('%s => %s', $alias, $this->relativeClass($class, $kernel)); |
| 141 | 149 | } |
| 142 | 150 | |
@@ -155,10 +163,13 @@ discard block |
||
| 155 | 163 | |
| 156 | 164 | private function getValue(object $object, string $property): mixed |
| 157 | 165 | { |
| 158 | - try { |
|
| 166 | + try |
|
| 167 | + { |
|
| 159 | 168 | $r = new \ReflectionObject($object); |
| 160 | 169 | $prop = $r->getProperty($property); |
| 161 | - } catch (\Throwable $e) { |
|
| 170 | + } |
|
| 171 | + catch (\Throwable $e) |
|
| 172 | + { |
|
| 162 | 173 | return $e->getMessage(); |
| 163 | 174 | } |
| 164 | 175 | |
@@ -169,7 +180,8 @@ discard block |
||
| 169 | 180 | { |
| 170 | 181 | $r = new \ReflectionObject($kernel); |
| 171 | 182 | |
| 172 | - if (\str_starts_with($class, $r->getNamespaceName())) { |
|
| 183 | + if (\str_starts_with($class, $r->getNamespaceName())) |
|
| 184 | + { |
|
| 173 | 185 | return \substr($class, \strlen($r->getNamespaceName()) + 1); |
| 174 | 186 | } |
| 175 | 187 | |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | $grid = $this->table(['Name:', 'Verbs:', 'Pattern:', 'Target:', 'Group:']); |
| 30 | 30 | |
| 31 | - foreach ($router->getRoutes() as $name => $route) { |
|
| 32 | - if ($route instanceof RouteInterface) { |
|
| 31 | + foreach ($router->getRoutes() as $name => $route){ |
|
| 32 | + if ($route instanceof RouteInterface){ |
|
| 33 | 33 | $grid->addRow( |
| 34 | 34 | [ |
| 35 | 35 | $name, |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | private function getRouteGroups(GroupRegistry $registry, string $routeName): array |
| 54 | 54 | { |
| 55 | 55 | $groups = []; |
| 56 | - foreach ($registry as $groupName => $group) { |
|
| 57 | - if ($group->hasRoute($routeName)) { |
|
| 56 | + foreach ($registry as $groupName => $group){ |
|
| 57 | + if ($group->hasRoute($routeName)){ |
|
| 58 | 58 | $groups[] = $groupName; |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -64,12 +64,12 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | private function getVerbs(RouteInterface $route): string |
| 66 | 66 | { |
| 67 | - if ($route->getVerbs() === RouteInterface::VERBS) { |
|
| 67 | + if ($route->getVerbs() === RouteInterface::VERBS){ |
|
| 68 | 68 | return '*'; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $result = []; |
| 72 | - foreach ($route->getVerbs() as $verb) { |
|
| 72 | + foreach ($route->getVerbs() as $verb){ |
|
| 73 | 73 | $result[] = match (\strtolower($verb)) { |
| 74 | 74 | 'get' => '<fg=green>GET</>', |
| 75 | 75 | 'head' => '<fg=bright-green>HEAD</>', |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $pattern = \preg_replace_callback( |
| 99 | 99 | '/<([^>]*)>/', |
| 100 | 100 | static fn($m) => \sprintf('<fg=magenta>%s</>', $m[0]), |
| 101 | - !empty($prefix) ? $prefix . '/' . \trim($pattern, '/') : $pattern, |
|
| 101 | + !empty($prefix) ? $prefix.'/'.\trim($pattern, '/') : $pattern, |
|
| 102 | 102 | ); |
| 103 | 103 | |
| 104 | 104 | return $pattern; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | private function getTarget(RouteInterface $route, KernelInterface $kernel): string |
| 111 | 111 | { |
| 112 | 112 | $target = $this->getValue($route, 'target'); |
| 113 | - switch (true) { |
|
| 113 | + switch (true){ |
|
| 114 | 114 | case $target instanceof \Closure: |
| 115 | 115 | $reflection = new \ReflectionFunction($target); |
| 116 | 116 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | return \sprintf( |
| 125 | 125 | '%s->%s', |
| 126 | 126 | $this->relativeClass($this->getValue($target, 'controller'), $kernel), |
| 127 | - \implode('|', (array) $this->getValue($target, 'action')), |
|
| 127 | + \implode('|', (array)$this->getValue($target, 'action')), |
|
| 128 | 128 | ); |
| 129 | 129 | |
| 130 | 130 | case $target instanceof Controller: |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | case $target instanceof Group: |
| 137 | 137 | $result = []; |
| 138 | - foreach ($this->getValue($target, 'controllers') as $alias => $class) { |
|
| 138 | + foreach ($this->getValue($target, 'controllers') as $alias => $class){ |
|
| 139 | 139 | $result[] = \sprintf('%s => %s', $alias, $this->relativeClass($class, $kernel)); |
| 140 | 140 | } |
| 141 | 141 | |
@@ -154,10 +154,10 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | private function getValue(object $object, string $property): mixed |
| 156 | 156 | { |
| 157 | - try { |
|
| 157 | + try{ |
|
| 158 | 158 | $r = new \ReflectionObject($object); |
| 159 | 159 | $prop = $r->getProperty($property); |
| 160 | - } catch (\Throwable $e) { |
|
| 160 | + }catch (\Throwable $e){ |
|
| 161 | 161 | return $e->getMessage(); |
| 162 | 162 | } |
| 163 | 163 | |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | { |
| 169 | 169 | $r = new \ReflectionObject($kernel); |
| 170 | 170 | |
| 171 | - if (\str_starts_with($class, $r->getNamespaceName())) { |
|
| 171 | + if (\str_starts_with($class, $r->getNamespaceName())){ |
|
| 172 | 172 | return \substr($class, \strlen($r->getNamespaceName()) + 1); |
| 173 | 173 | } |
| 174 | 174 | |