Passed
Pull Request — master (#1205)
by Aleksei
18:36 queued 06:28
created
src/Core/src/Internal/Proxy/ProxyClassRenderer.php 2 patches
Braces   +23 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,22 +27,28 @@  discard block
 block discarded – undo
27 27
             MagicCallTrait::class,
28 28
         ] : [];
29 29
 
30
-        if (\str_contains($className, '\\')) {
30
+        if (\str_contains($className, '\\'))
31
+        {
31 32
             $classShortName = \substr($className, \strrpos($className, '\\') + 1);
32 33
             $classNamespaceStr = 'namespace ' . \substr($className, 0, \strrpos($className, '\\')) . ';';
33
-        } else {
34
+        }
35
+        else
36
+        {
34 37
             $classShortName = $className;
35 38
             $classNamespaceStr = '';
36 39
         }
37 40
 
38 41
         $interface = $type->getName();
39 42
         $classBody = [];
40
-        foreach ($type->getMethods() as $method) {
41
-            if ($method->isConstructor()) {
43
+        foreach ($type->getMethods() as $method)
44
+        {
45
+            if ($method->isConstructor())
46
+            {
42 47
                 throw new \LogicException('Constructor is not allowed in a proxy.');
43 48
             }
44 49
 
45
-            if ($method->isDestructor()) {
50
+            if ($method->isDestructor())
51
+            {
46 52
                 $classBody[] = self::renderMethod($method);
47 53
                 continue;
48 54
             }
@@ -69,12 +75,14 @@  discard block
 block discarded – undo
69 75
                 PHP;
70 76
 
71 77
             $args = [];
72
-            foreach ($method->getParameters() as $param) {
78
+            foreach ($method->getParameters() as $param)
79
+            {
73 80
                 $hasRefs = $hasRefs || $param->isPassedByReference();
74 81
                 $args[] = ($param->isVariadic() ? '...' : '') . '$' . $param->getName();
75 82
             }
76 83
 
77
-            if (!$hasRefs && !$method->isVariadic()) {
84
+            if (!$hasRefs && !$method->isVariadic())
85
+            {
78 86
                 $classBody[] = self::renderMethod(
79 87
                     $method,
80 88
                     <<<PHP
@@ -86,7 +94,8 @@  discard block
 block discarded – undo
86 94
 
87 95
             $argsStr = \implode(', ', $args);
88 96
 
89
-            if ($method->isVariadic()) {
97
+            if ($method->isVariadic())
98
+            {
90 99
                 $classBody[] = self::renderMethod(
91 100
                     $method,
92 101
                     <<<PHP
@@ -154,7 +163,8 @@  discard block
 block discarded – undo
154 163
 
155 164
     public static function renderParameterTypes(\ReflectionType $types, \ReflectionClass $class): string
156 165
     {
157
-        if ($types instanceof \ReflectionNamedType) {
166
+        if ($types instanceof \ReflectionNamedType)
167
+        {
158 168
             return ($types->allowsNull() && $types->getName() !== 'mixed' ? '?' : '') . ($types->isBuiltin()
159 169
                     ? $types->getName()
160 170
                     : self::normalizeClassType($types, $class));
@@ -167,7 +177,8 @@  discard block
 block discarded – undo
167 177
         };
168 178
 
169 179
         $result = [];
170
-        foreach ($types as $type) {
180
+        foreach ($types as $type)
181
+        {
171 182
             $result[] = $type->isBuiltin()
172 183
                 ? $type->getName()
173 184
                 : self::normalizeClassType($type, $class);
@@ -178,7 +189,8 @@  discard block
 block discarded – undo
178 189
 
179 190
     public static function renderDefaultValue(\ReflectionParameter $param): string
180 191
     {
181
-        if ($param->isDefaultValueConstant()) {
192
+        if ($param->isDefaultValueConstant())
193
+        {
182 194
             $result = $param->getDefaultValueConstantName();
183 195
 
184 196
             return \explode('::', (string) $result)[0] === 'self'
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -27,29 +27,29 @@  discard block
 block discarded – undo
27 27
             MagicCallTrait::class,
28 28
         ] : [];
29 29
 
30
-        if (\str_contains($className, '\\')) {
30
+        if (\str_contains($className, '\\')){
31 31
             $classShortName = \substr($className, \strrpos($className, '\\') + 1);
32
-            $classNamespaceStr = 'namespace ' . \substr($className, 0, \strrpos($className, '\\')) . ';';
33
-        } else {
32
+            $classNamespaceStr = 'namespace '.\substr($className, 0, \strrpos($className, '\\')).';';
33
+        }else{
34 34
             $classShortName = $className;
35 35
             $classNamespaceStr = '';
36 36
         }
37 37
 
38 38
         $interface = $type->getName();
39 39
         $classBody = [];
40
-        foreach ($type->getMethods() as $method) {
41
-            if ($method->isConstructor()) {
40
+        foreach ($type->getMethods() as $method){
41
+            if ($method->isConstructor()){
42 42
                 throw new \LogicException('Constructor is not allowed in a proxy.');
43 43
             }
44 44
 
45
-            if ($method->isDestructor()) {
45
+            if ($method->isDestructor()){
46 46
                 $classBody[] = self::renderMethod($method);
47 47
                 continue;
48 48
             }
49 49
 
50 50
             $hasRefs = false;
51
-            $return = $method->hasReturnType() && (string) $method->getReturnType() === 'void' ? '' : 'return ';
52
-            $call = ($method->isStatic() ? '::' : '->') . $method->getName();
51
+            $return = $method->hasReturnType() && (string)$method->getReturnType() === 'void' ? '' : 'return ';
52
+            $call = ($method->isStatic() ? '::' : '->').$method->getName();
53 53
             $context = $method->isStatic() ? 'null' : '$this->__container_proxy_context';
54 54
             $containerStr = match (false) {
55 55
                 $attachContainer => 'null',
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
                 PHP;
70 70
 
71 71
             $args = [];
72
-            foreach ($method->getParameters() as $param) {
72
+            foreach ($method->getParameters() as $param){
73 73
                 $hasRefs = $hasRefs || $param->isPassedByReference();
74
-                $args[] = ($param->isVariadic() ? '...' : '') . '$' . $param->getName();
74
+                $args[] = ($param->isVariadic() ? '...' : '').'$'.$param->getName();
75 75
             }
76 76
 
77
-            if (!$hasRefs && !$method->isVariadic()) {
77
+            if (!$hasRefs && !$method->isVariadic()){
78 78
                 $classBody[] = self::renderMethod(
79 79
                     $method,
80 80
                     <<<PHP
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
             $argsStr = \implode(', ', $args);
88 88
 
89
-            if ($method->isVariadic()) {
89
+            if ($method->isVariadic()){
90 90
                 $classBody[] = self::renderMethod(
91 91
                     $method,
92 92
                     <<<PHP
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         $traitsStr = $traits === [] ? '' : \implode(
110 110
             "\n    ",
111
-            \array_map(static fn(string $trait): string => 'use \\' . \ltrim($trait, '\\') . ';', $traits),
111
+            \array_map(static fn(string $trait) : string => 'use \\'.\ltrim($trait, '\\').';', $traits),
112 112
         );
113 113
         return <<<PHP
114 114
             $classNamespaceStr
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             $m->getName(),
132 132
             \implode(', ', \array_map(self::renderParameter(...), $m->getParameters())),
133 133
             $m->hasReturnType()
134
-                ? ': ' . self::renderParameterTypes($m->getReturnType(), $m->getDeclaringClass())
134
+                ? ': '.self::renderParameterTypes($m->getReturnType(), $m->getDeclaringClass())
135 135
                 : '',
136 136
             $body,
137 137
         );
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
                 $param->hasType() ? 'mixed' : '',
146 146
                 $param->isPassedByReference() ? '&' : '',
147 147
                 $param->isVariadic() ? '...' : '',
148
-                '$' . $param->getName(),
149
-                $param->isOptional() && !$param->isVariadic() ? ' = ' . self::renderDefaultValue($param) : '',
148
+                '$'.$param->getName(),
149
+                $param->isOptional() && !$param->isVariadic() ? ' = '.self::renderDefaultValue($param) : '',
150 150
             ),
151 151
             ' ',
152 152
         );
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 
155 155
     public static function renderParameterTypes(\ReflectionType $types, \ReflectionClass $class): string
156 156
     {
157
-        if ($types instanceof \ReflectionNamedType) {
158
-            return ($types->allowsNull() && $types->getName() !== 'mixed' ? '?' : '') . ($types->isBuiltin()
157
+        if ($types instanceof \ReflectionNamedType){
158
+            return ($types->allowsNull() && $types->getName() !== 'mixed' ? '?' : '').($types->isBuiltin()
159 159
                     ? $types->getName()
160 160
                     : self::normalizeClassType($types, $class));
161 161
         }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         };
168 168
 
169 169
         $result = [];
170
-        foreach ($types as $type) {
170
+        foreach ($types as $type){
171 171
             $result[] = $type->isBuiltin()
172 172
                 ? $type->getName()
173 173
                 : self::normalizeClassType($type, $class);
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
 
179 179
     public static function renderDefaultValue(\ReflectionParameter $param): string
180 180
     {
181
-        if ($param->isDefaultValueConstant()) {
181
+        if ($param->isDefaultValueConstant()){
182 182
             $result = $param->getDefaultValueConstantName();
183 183
 
184
-            return \explode('::', (string) $result)[0] === 'self'
184
+            return \explode('::', (string)$result)[0] === 'self'
185 185
                 ? $result
186
-                : '\\' . $result;
186
+                : '\\'.$result;
187 187
         }
188 188
 
189 189
         $cut = self::cutDefaultValue($param);
@@ -195,12 +195,12 @@  discard block
 block discarded – undo
195 195
 
196 196
     public static function normalizeClassType(\ReflectionNamedType $type, \ReflectionClass $class): string
197 197
     {
198
-        return '\\' . ($type->getName() === 'self' ? $class->getName() : $type->getName());
198
+        return '\\'.($type->getName() === 'self' ? $class->getName() : $type->getName());
199 199
     }
200 200
 
201 201
     private static function cutDefaultValue(\ReflectionParameter $param): string
202 202
     {
203
-        $string = (string) $param;
203
+        $string = (string)$param;
204 204
 
205 205
         return \trim(\substr($string, \strpos($string, '=') + 1, -1));
206 206
     }
Please login to merge, or discard this patch.
src/Prototype/src/Annotation/Parser.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,23 +18,23 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $lines = \explode("\n", $comment);
20 20
 
21
-        foreach ($lines as $line) {
21
+        foreach ($lines as $line){
22 22
             // strip up comment prefix
23 23
             /** @var string $line */
24 24
             $line = \preg_replace('/[\t ]*[\/]?\*[\/]? ?/', '', $line);
25 25
 
26
-            if (\preg_match('/ *@([^ ]+) (.*)/u', $line, $matches)) {
26
+            if (\preg_match('/ *@([^ ]+) (.*)/u', $line, $matches)){
27 27
                 $this->lines[] = new Line($matches[2], $matches[1]);
28
-            } else {
28
+            }else{
29 29
                 $this->lines[] = new Line($line);
30 30
             }
31 31
         }
32 32
 
33
-        if (isset($this->lines[0]) && $this->lines[0]->isEmpty()) {
33
+        if (isset($this->lines[0]) && $this->lines[0]->isEmpty()){
34 34
             \array_shift($this->lines);
35 35
         }
36 36
 
37
-        if (isset($this->lines[\count($this->lines) - 1]) && $this->lines[\count($this->lines) - 1]->isEmpty()) {
37
+        if (isset($this->lines[\count($this->lines) - 1]) && $this->lines[\count($this->lines) - 1]->isEmpty()){
38 38
             \array_pop($this->lines);
39 39
         }
40 40
     }
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $result[] = '/**';
46 46
 
47 47
         // skip first and last tokens
48
-        foreach ($this->lines as $line) {
49
-            if ($line->type === null) {
48
+        foreach ($this->lines as $line){
49
+            if ($line->type === null){
50 50
                 $result[] = \sprintf(' * %s', $line->value);
51 51
                 continue;
52 52
             }
Please login to merge, or discard this patch.
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,23 +18,29 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $lines = \explode("\n", $comment);
20 20
 
21
-        foreach ($lines as $line) {
21
+        foreach ($lines as $line)
22
+        {
22 23
             // strip up comment prefix
23 24
             /** @var string $line */
24 25
             $line = \preg_replace('/[\t ]*[\/]?\*[\/]? ?/', '', $line);
25 26
 
26
-            if (\preg_match('/ *@([^ ]+) (.*)/u', $line, $matches)) {
27
+            if (\preg_match('/ *@([^ ]+) (.*)/u', $line, $matches))
28
+            {
27 29
                 $this->lines[] = new Line($matches[2], $matches[1]);
28
-            } else {
30
+            }
31
+            else
32
+            {
29 33
                 $this->lines[] = new Line($line);
30 34
             }
31 35
         }
32 36
 
33
-        if (isset($this->lines[0]) && $this->lines[0]->isEmpty()) {
37
+        if (isset($this->lines[0]) && $this->lines[0]->isEmpty())
38
+        {
34 39
             \array_shift($this->lines);
35 40
         }
36 41
 
37
-        if (isset($this->lines[\count($this->lines) - 1]) && $this->lines[\count($this->lines) - 1]->isEmpty()) {
42
+        if (isset($this->lines[\count($this->lines) - 1]) && $this->lines[\count($this->lines) - 1]->isEmpty())
43
+        {
38 44
             \array_pop($this->lines);
39 45
         }
40 46
     }
@@ -45,8 +51,10 @@  discard block
 block discarded – undo
45 51
         $result[] = '/**';
46 52
 
47 53
         // skip first and last tokens
48
-        foreach ($this->lines as $line) {
49
-            if ($line->type === null) {
54
+        foreach ($this->lines as $line)
55
+        {
56
+            if ($line->type === null)
57
+            {
50 58
                 $result[] = \sprintf(' * %s', $line->value);
51 59
                 continue;
52 60
             }
Please login to merge, or discard this patch.
src/Console/src/Configurator/ConstantBasedConfigurator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
     public function configure(Command $command, \ReflectionClass $reflection): void
15 15
     {
16 16
         $command->setName($reflection->getConstant('NAME'));
17
-        $command->setDescription((string) $reflection->getConstant('DESCRIPTION'));
17
+        $command->setDescription((string)$reflection->getConstant('DESCRIPTION'));
18 18
 
19
-        foreach ($reflection->getMethod('defineOptions')->invoke($command) as $option) {
19
+        foreach ($reflection->getMethod('defineOptions')->invoke($command) as $option){
20 20
             $command->addOption(...$option);
21 21
         }
22 22
 
23
-        foreach ($reflection->getMethod('defineArguments')->invoke($command) as $argument) {
23
+        foreach ($reflection->getMethod('defineArguments')->invoke($command) as $argument){
24 24
             $command->addArgument(...$argument);
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,13 @@
 block discarded – undo
16 16
         $command->setName($reflection->getConstant('NAME'));
17 17
         $command->setDescription((string) $reflection->getConstant('DESCRIPTION'));
18 18
 
19
-        foreach ($reflection->getMethod('defineOptions')->invoke($command) as $option) {
19
+        foreach ($reflection->getMethod('defineOptions')->invoke($command) as $option)
20
+        {
20 21
             $command->addOption(...$option);
21 22
         }
22 23
 
23
-        foreach ($reflection->getMethod('defineArguments')->invoke($command) as $argument) {
24
+        foreach ($reflection->getMethod('defineArguments')->invoke($command) as $argument)
25
+        {
24 26
             $command->addArgument(...$argument);
25 27
         }
26 28
     }
Please login to merge, or discard this patch.
src/Core/src/Internal/Introspector.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $scope = self::getAccessor($container)->scope;
30 30
         $result = [];
31
-        do {
31
+        do{
32 32
             $result[] = $scope->getScopeName();
33 33
             $scope = $scope->getParentScope();
34
-        } while ($scope !== null);
34
+        }while ($scope !== null);
35 35
 
36 36
         return $result;
37 37
     }
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
             Proxy::isProxy($container) => ContainerScope::getContainer() ?? throw new \RuntimeException(
47 47
                 'Container Proxy is out of scope.',
48 48
             ),
49
-            default => throw new \InvalidArgumentException('Container must be an instance of ' . Container::class),
49
+            default => throw new \InvalidArgumentException('Container must be an instance of '.Container::class),
50 50
         };
51 51
 
52 52
         $container ??= ContainerScope::getContainer();
53 53
 
54
-        if (!$container instanceof Container) {
54
+        if (!$container instanceof Container){
55 55
             throw new \RuntimeException('Container is not available.');
56 56
         }
57 57
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $scope = self::getAccessor($container)->scope;
30 30
         $result = [];
31
-        do {
31
+        do
32
+        {
32 33
             $result[] = $scope->getScopeName();
33 34
             $scope = $scope->getParentScope();
34 35
         } while ($scope !== null);
@@ -51,7 +52,8 @@  discard block
 block discarded – undo
51 52
 
52 53
         $container ??= ContainerScope::getContainer();
53 54
 
54
-        if (!$container instanceof Container) {
55
+        if (!$container instanceof Container)
56
+        {
55 57
             throw new \RuntimeException('Container is not available.');
56 58
         }
57 59
 
Please login to merge, or discard this patch.
src/Bridge/Stempler/tests/BaseTestCase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@
 block discarded – undo
40 40
     public function defineDirectories(string $root): array
41 41
     {
42 42
         return [
43
-            'app'   => __DIR__ . '/fixtures',
44
-            'cache' => __DIR__ . '/cache',
45
-            'config' => __DIR__ . '/config',
43
+            'app'   => __DIR__.'/fixtures',
44
+            'cache' => __DIR__.'/cache',
45
+            'config' => __DIR__.'/config',
46 46
         ] + parent::defineDirectories($root);
47 47
     }
48 48
 
Please login to merge, or discard this patch.
src/Logger/src/ListenerRegistry.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
     public function addListener(callable $listener): self
16 16
     {
17
-        if (!\in_array($listener, $this->listeners, true)) {
17
+        if (!\in_array($listener, $this->listeners, true)){
18 18
             $this->listeners[] = $listener;
19 19
         }
20 20
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function removeListener(callable $listener): void
25 25
     {
26 26
         $key = \array_search($listener, $this->listeners, true);
27
-        if ($key !== false) {
27
+        if ($key !== false){
28 28
             unset($this->listeners[$key]);
29 29
         }
30 30
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@  discard block
 block discarded – undo
14 14
 
15 15
     public function addListener(callable $listener): self
16 16
     {
17
-        if (!\in_array($listener, $this->listeners, true)) {
17
+        if (!\in_array($listener, $this->listeners, true))
18
+        {
18 19
             $this->listeners[] = $listener;
19 20
         }
20 21
 
@@ -24,7 +25,8 @@  discard block
 block discarded – undo
24 25
     public function removeListener(callable $listener): void
25 26
     {
26 27
         $key = \array_search($listener, $this->listeners, true);
27
-        if ($key !== false) {
28
+        if ($key !== false)
29
+        {
28 30
             unset($this->listeners[$key]);
29 31
         }
30 32
     }
Please login to merge, or discard this patch.
src/Router/src/Target/AbstractTarget.php 2 patches
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,13 +86,15 @@  discard block
 block discarded – undo
86 86
 
87 87
     protected function coreHandler(ContainerInterface $container): CoreHandler
88 88
     {
89
-        if ($this->handler !== null) {
89
+        if ($this->handler !== null)
90
+        {
90 91
             return $this->handler;
91 92
         }
92 93
 
93 94
         $scope = Proxy::create(new \ReflectionClass(ScopeInterface::class), null, new \Spiral\Core\Attribute\Proxy());
94 95
 
95
-        try {
96
+        try
97
+        {
96 98
             // construct on demand
97 99
             $this->handler = new CoreHandler(
98 100
                 match (false) {
@@ -106,7 +108,9 @@  discard block
 block discarded – undo
106 108
             );
107 109
 
108 110
             return $this->handler;
109
-        } catch (ContainerExceptionInterface $e) {
111
+        }
112
+        catch (ContainerExceptionInterface $e)
113
+        {
110 114
             throw new TargetException($e->getMessage(), $e->getCode(), $e);
111 115
         }
112 116
     }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     // Automatically prepend HTTP verb to all action names.
28 28
     public const RESTFUL = 1;
29 29
 
30
-    private HandlerInterface|CoreInterface|null $pipeline = null;
30
+    private HandlerInterface | CoreInterface | null $pipeline = null;
31 31
     private ?CoreHandler $handler = null;
32 32
     private bool $verbActions;
33 33
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         private array $constrains,
37 37
         int $options = 0,
38 38
         private string $defaultAction = 'index',
39
-    ) {
39
+    ){
40 40
         $this->verbActions = ($options & self::RESTFUL) === self::RESTFUL;
41 41
     }
42 42
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @mutation-free
55 55
      * @deprecated Use {@see withHandler()} instead.
56 56
      */
57
-    public function withCore(HandlerInterface|CoreInterface $core): TargetInterface
57
+    public function withCore(HandlerInterface | CoreInterface $core): TargetInterface
58 58
     {
59 59
         $target = clone $this;
60 60
         $target->pipeline = $core;
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 
87 87
     protected function coreHandler(ContainerInterface $container): CoreHandler
88 88
     {
89
-        if ($this->handler !== null) {
89
+        if ($this->handler !== null){
90 90
             return $this->handler;
91 91
         }
92 92
 
93 93
         $scope = Proxy::create(new \ReflectionClass(ScopeInterface::class), null, new \Spiral\Core\Attribute\Proxy());
94 94
 
95
-        try {
95
+        try{
96 96
             // construct on demand
97 97
             $this->handler = new CoreHandler(
98 98
                 match (false) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             );
107 107
 
108 108
             return $this->handler;
109
-        } catch (ContainerExceptionInterface $e) {
109
+        }catch (ContainerExceptionInterface $e){
110 110
             throw new TargetException($e->getMessage(), $e->getCode(), $e);
111 111
         }
112 112
     }
Please login to merge, or discard this patch.
src/Router/tests/Stub/IdentityScopedMiddleware.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     public function __construct(
18 18
         #[Proxy] private ScopeInterface $scope,
19
-    ) {}
19
+    ){}
20 20
 
21 21
     public function process(
22 22
         ServerRequestInterface $request,
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,8 @@
 block discarded – undo
16 16
 {
17 17
     public function __construct(
18 18
         #[Proxy] private ScopeInterface $scope,
19
-    ) {}
19
+    ) {
20
+}
20 21
 
21 22
     public function process(
22 23
         ServerRequestInterface $request,
Please login to merge, or discard this patch.
src/Boot/src/Memory.php 2 patches
Braces   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,29 +30,37 @@
 block discarded – undo
30 30
     {
31 31
         $filename = $this->getFilename($section);
32 32
 
33
-        if (!\file_exists($filename)) {
33
+        if (!\file_exists($filename))
34
+        {
34 35
             return null;
35 36
         }
36 37
 
37 38
         $fp = false;
38 39
         $lock = false;
39 40
 
40
-        try {
41
+        try
42
+        {
41 43
             $fp = \fopen($filename, 'r');
42
-            if ($fp === false) {
44
+            if ($fp === false)
45
+            {
43 46
                 return null;
44 47
             }
45 48
 
46 49
             $lock = \flock($fp, \LOCK_SH | \LOCK_NB);
47 50
 
48
-            if ($lock === false) {
51
+            if ($lock === false)
52
+            {
49 53
                 return null;
50 54
             }
51 55
 
52 56
             return include($filename);
53
-        } catch (\Throwable) {
57
+        }
58
+        catch (\Throwable)
59
+        {
54 60
             return null;
55
-        } finally {
61
+        }
62
+        finally
63
+        {
56 64
             $lock === false or \flock($fp, \LOCK_UN);
57 65
             $fp === false or \fclose($fp);
58 66
         }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function __construct(
20 20
         string $directory,
21 21
         private readonly FilesInterface $files,
22
-    ) {
22
+    ){
23 23
         $this->directory = \rtrim($directory, '/');
24 24
     }
25 25
 
@@ -30,29 +30,29 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $filename = $this->getFilename($section);
32 32
 
33
-        if (!\file_exists($filename)) {
33
+        if (!\file_exists($filename)){
34 34
             return null;
35 35
         }
36 36
 
37 37
         $fp = false;
38 38
         $lock = false;
39 39
 
40
-        try {
40
+        try{
41 41
             $fp = \fopen($filename, 'r');
42
-            if ($fp === false) {
42
+            if ($fp === false){
43 43
                 return null;
44 44
             }
45 45
 
46 46
             $lock = \flock($fp, \LOCK_SH | \LOCK_NB);
47 47
 
48
-            if ($lock === false) {
48
+            if ($lock === false){
49 49
                 return null;
50 50
             }
51 51
 
52 52
             return include($filename);
53
-        } catch (\Throwable) {
53
+        }catch (\Throwable){
54 54
             return null;
55
-        } finally {
55
+        }finally{
56 56
             $lock === false or \flock($fp, \LOCK_UN);
57 57
             $fp === false or \fclose($fp);
58 58
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $this->files->write(
64 64
             $this->getFilename($section),
65
-            '<?php return ' . \var_export($data, true) . ';',
65
+            '<?php return '.\var_export($data, true).';',
66 66
             FilesInterface::RUNTIME,
67 67
             true,
68 68
         );
Please login to merge, or discard this patch.