Test Failed
Pull Request — master (#1170)
by Aleksei
19:12 queued 08:18
created
src/Bridge/Stempler/src/StemplerEngine.php 2 patches
Braces   +51 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,7 +64,8 @@  discard block
 block discarded – undo
64 64
 
65 65
     public function getLoader(): LoaderInterface
66 66
     {
67
-        if ($this->loader === null) {
67
+        if ($this->loader === null)
68
+        {
68 69
             throw new EngineException('No associated loader found');
69 70
         }
70 71
 
@@ -76,13 +77,15 @@  discard block
 block discarded – undo
76 77
      */
77 78
     public function getBuilder(ContextInterface $context): Builder
78 79
     {
79
-        if ($this->builder === null) {
80
+        if ($this->builder === null)
81
+        {
80 82
             throw new EngineException('No associated builder found');
81 83
         }
82 84
 
83 85
         // since view source support pre-processing we must ensure that context is always set
84 86
         $loader = $this->builder->getLoader();
85
-        if ($loader instanceof StemplerLoader) {
87
+        if ($loader instanceof StemplerLoader)
88
+        {
86 89
             $loader->setContext($context);
87 90
         }
88 91
 
@@ -100,20 +103,27 @@  discard block
 block discarded – undo
100 103
         // cache key
101 104
         $key = $this->cacheKey($view, $context);
102 105
 
103
-        if ($this->cache !== null && $this->cache->isFresh($key)) {
106
+        if ($this->cache !== null && $this->cache->isFresh($key))
107
+        {
104 108
             $this->cache->load($key);
105
-        } elseif (!\class_exists($class)) {
106
-            try {
109
+        }
110
+        elseif (!\class_exists($class))
111
+        {
112
+            try
113
+            {
107 114
                 $builder = $this->getBuilder($context);
108 115
 
109 116
                 $result = $builder->compile($path);
110
-            } catch (Throwable $e) {
117
+            }
118
+            catch (Throwable $e)
119
+            {
111 120
                 throw new CompileException($e);
112 121
             }
113 122
 
114 123
             $compiled = $this->compileClass($class, $result);
115 124
 
116
-            if ($this->cache !== null) {
125
+            if ($this->cache !== null)
126
+            {
117 127
                 $this->cache->write(
118 128
                     $key,
119 129
                     $compiled,
@@ -126,13 +136,15 @@  discard block
 block discarded – undo
126 136
                 $this->cache->load($key);
127 137
             }
128 138
 
129
-            if (!\class_exists($class)) {
139
+            if (!\class_exists($class))
140
+            {
130 141
                 // runtime initialization
131 142
                 eval('?>' . $compiled);
132 143
             }
133 144
         }
134 145
 
135
-        if (!\class_exists($class) || !\is_subclass_of($class, ViewInterface::class)) {
146
+        if (!\class_exists($class) || !\is_subclass_of($class, ViewInterface::class))
147
+        {
136 148
             throw new EngineException(\sprintf('Unable to load `%s`, cache might be corrupted.', $path));
137 149
         }
138 150
 
@@ -141,7 +153,8 @@  discard block
 block discarded – undo
141 153
 
142 154
     public function reset(string $path, ContextInterface $context): void
143 155
     {
144
-        if ($this->cache === null) {
156
+        if ($this->cache === null)
157
+        {
145 158
             return;
146 159
         }
147 160
 
@@ -160,12 +173,15 @@  discard block
 block discarded – undo
160 173
      */
161 174
     public function makeSourceMap(string $path, ContextInterface $context): ?SourceMap
162 175
     {
163
-        try {
176
+        try
177
+        {
164 178
             $builder = $this->getBuilder($context);
165 179
 
166 180
             // there is no need to cache sourcemaps since they are used during the exception only
167 181
             return $builder->compile($path)->getSourceMap($builder->getLoader());
168
-        } catch (Throwable) {
182
+        }
183
+        catch (Throwable)
184
+        {
169 185
             return null;
170 186
         }
171 187
     }
@@ -222,7 +238,8 @@  discard block
 block discarded – undo
222 238
         $builder = new Builder($loader);
223 239
 
224 240
         $directivesGroup = new DirectiveGroup();
225
-        foreach ($this->getDirectives() as $directive) {
241
+        foreach ($this->getDirectives() as $directive)
242
+        {
226 243
             $directivesGroup->addDirective($directive);
227 244
         }
228 245
 
@@ -253,7 +270,8 @@  discard block
 block discarded – undo
253 270
         $builder->getCompiler()->addRenderer(new DynamicRenderer(new DirectiveGroup($this->getDirectives())));
254 271
 
255 272
         // ATS modifications
256
-        foreach ($this->getVisitors(Builder::STAGE_PREPARE) as $visitor) {
273
+        foreach ($this->getVisitors(Builder::STAGE_PREPARE) as $visitor)
274
+        {
257 275
             $builder->addVisitor($visitor, Builder::STAGE_PREPARE);
258 276
         }
259 277
 
@@ -266,15 +284,18 @@  discard block
 block discarded – undo
266 284
         $builder->addVisitor(new ResolveImports($builder), Builder::STAGE_TRANSFORM);
267 285
         $builder->addVisitor(new ExtendsParent($builder), Builder::STAGE_TRANSFORM);
268 286
 
269
-        foreach ($this->getVisitors(Builder::STAGE_TRANSFORM) as $visitor) {
287
+        foreach ($this->getVisitors(Builder::STAGE_TRANSFORM) as $visitor)
288
+        {
270 289
             $builder->addVisitor($visitor, Builder::STAGE_TRANSFORM);
271 290
         }
272 291
 
273
-        foreach ($this->getVisitors(Builder::STAGE_FINALIZE) as $visitor) {
292
+        foreach ($this->getVisitors(Builder::STAGE_FINALIZE) as $visitor)
293
+        {
274 294
             $builder->addVisitor($visitor, Builder::STAGE_FINALIZE);
275 295
         }
276 296
 
277
-        foreach ($this->getVisitors(Builder::STAGE_COMPILE) as $visitor) {
297
+        foreach ($this->getVisitors(Builder::STAGE_COMPILE) as $visitor)
298
+        {
278 299
             $builder->addVisitor($visitor, Builder::STAGE_COMPILE);
279 300
         }
280 301
 
@@ -287,8 +308,10 @@  discard block
 block discarded – undo
287 308
     private function getVisitors(int $stage): iterable
288 309
     {
289 310
         $result = [];
290
-        foreach ($this->config->getVisitors($stage) as $visitor) {
291
-            if ($visitor instanceof Autowire) {
311
+        foreach ($this->config->getVisitors($stage) as $visitor)
312
+        {
313
+            if ($visitor instanceof Autowire)
314
+            {
292 315
                 $result[] = $visitor->resolve($this->container->get(FactoryInterface::class));
293 316
                 continue;
294 317
             }
@@ -305,8 +328,10 @@  discard block
 block discarded – undo
305 328
     private function getProcessors(): iterable
306 329
     {
307 330
         $result = [];
308
-        foreach ($this->config->getProcessors() as $processor) {
309
-            if ($processor instanceof Autowire) {
331
+        foreach ($this->config->getProcessors() as $processor)
332
+        {
333
+            if ($processor instanceof Autowire)
334
+            {
310 335
                 $result[] = $processor->resolve($this->container->get(FactoryInterface::class));
311 336
                 continue;
312 337
             }
@@ -323,8 +348,10 @@  discard block
 block discarded – undo
323 348
     private function getDirectives(): iterable
324 349
     {
325 350
         $result = [];
326
-        foreach ($this->config->getDirectives() as $directive) {
327
-            if ($directive instanceof Autowire) {
351
+        foreach ($this->config->getDirectives() as $directive)
352
+        {
353
+            if ($directive instanceof Autowire)
354
+            {
328 355
                 $result[] = $directive->resolve($this->container->get(FactoryInterface::class));
329 356
                 continue;
330 357
             }
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         #[Proxy] private readonly ContainerInterface $container,
47 47
         private readonly StemplerConfig $config,
48 48
         private readonly ?StemplerCache $cache = null
49
-    ) {
49
+    ){
50 50
     }
51 51
 
52 52
     public function getContainer(): ContainerInterface
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function getLoader(): LoaderInterface
67 67
     {
68
-        if ($this->loader === null) {
68
+        if ($this->loader === null){
69 69
             throw new EngineException('No associated loader found');
70 70
         }
71 71
 
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function getBuilder(ContextInterface $context): Builder
79 79
     {
80
-        if ($this->builder === null) {
80
+        if ($this->builder === null){
81 81
             throw new EngineException('No associated builder found');
82 82
         }
83 83
 
84 84
         // since view source support pre-processing we must ensure that context is always set
85 85
         $loader = $this->builder->getLoader();
86
-        if ($loader instanceof StemplerLoader) {
86
+        if ($loader instanceof StemplerLoader){
87 87
             $loader->setContext($context);
88 88
         }
89 89
 
@@ -101,20 +101,20 @@  discard block
 block discarded – undo
101 101
         // cache key
102 102
         $key = $this->cacheKey($view, $context);
103 103
 
104
-        if ($this->cache !== null && $this->cache->isFresh($key)) {
104
+        if ($this->cache !== null && $this->cache->isFresh($key)){
105 105
             $this->cache->load($key);
106
-        } elseif (!\class_exists($class)) {
107
-            try {
106
+        } elseif (!\class_exists($class)){
107
+            try{
108 108
                 $builder = $this->getBuilder($context);
109 109
 
110 110
                 $result = $builder->compile($path);
111
-            } catch (Throwable $e) {
111
+            }catch (Throwable $e){
112 112
                 throw new CompileException($e);
113 113
             }
114 114
 
115 115
             $compiled = $this->compileClass($class, $result);
116 116
 
117
-            if ($this->cache !== null) {
117
+            if ($this->cache !== null){
118 118
                 $this->cache->write(
119 119
                     $key,
120 120
                     $compiled,
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
                 $this->cache->load($key);
128 128
             }
129 129
 
130
-            if (!\class_exists($class)) {
130
+            if (!\class_exists($class)){
131 131
                 // runtime initialization
132
-                eval('?>' . $compiled);
132
+                eval('?>'.$compiled);
133 133
             }
134 134
         }
135 135
 
136
-        if (!\class_exists($class) || !\is_subclass_of($class, ViewInterface::class)) {
136
+        if (!\class_exists($class) || !\is_subclass_of($class, ViewInterface::class)){
137 137
             throw new EngineException(\sprintf('Unable to load `%s`, cache might be corrupted.', $path));
138 138
         }
139 139
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
     public function reset(string $path, ContextInterface $context): void
144 144
     {
145
-        if ($this->cache === null) {
145
+        if ($this->cache === null){
146 146
             return;
147 147
         }
148 148
 
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
      */
162 162
     public function makeSourceMap(string $path, ContextInterface $context): ?SourceMap
163 163
     {
164
-        try {
164
+        try{
165 165
             $builder = $this->getBuilder($context);
166 166
 
167 167
             // there is no need to cache sourcemaps since they are used during the exception only
168 168
             return $builder->compile($path)->getSourceMap($builder->getLoader());
169
-        } catch (Throwable) {
169
+        }catch (Throwable){
170 170
             return null;
171 171
         }
172 172
     }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     private function className(ViewSource $source, ContextInterface $context): string
204 204
     {
205
-        return $this->classPrefix . $this->cacheKey($source, $context);
205
+        return $this->classPrefix.$this->cacheKey($source, $context);
206 206
     }
207 207
 
208 208
     private function cacheKey(ViewSource $source, ContextInterface $context): string
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         $builder = new Builder($loader);
223 223
 
224 224
         $directivesGroup = new DirectiveGroup();
225
-        foreach ($this->getDirectives() as $directive) {
225
+        foreach ($this->getDirectives() as $directive){
226 226
             $directivesGroup->addDirective($directive);
227 227
         }
228 228
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         $builder->getCompiler()->addRenderer(new DynamicRenderer(new DirectiveGroup($this->getDirectives())));
254 254
 
255 255
         // ATS modifications
256
-        foreach ($this->getVisitors(Builder::STAGE_PREPARE) as $visitor) {
256
+        foreach ($this->getVisitors(Builder::STAGE_PREPARE) as $visitor){
257 257
             $builder->addVisitor($visitor, Builder::STAGE_PREPARE);
258 258
         }
259 259
 
@@ -266,15 +266,15 @@  discard block
 block discarded – undo
266 266
         $builder->addVisitor(new ResolveImports($builder), Builder::STAGE_TRANSFORM);
267 267
         $builder->addVisitor(new ExtendsParent($builder), Builder::STAGE_TRANSFORM);
268 268
 
269
-        foreach ($this->getVisitors(Builder::STAGE_TRANSFORM) as $visitor) {
269
+        foreach ($this->getVisitors(Builder::STAGE_TRANSFORM) as $visitor){
270 270
             $builder->addVisitor($visitor, Builder::STAGE_TRANSFORM);
271 271
         }
272 272
 
273
-        foreach ($this->getVisitors(Builder::STAGE_FINALIZE) as $visitor) {
273
+        foreach ($this->getVisitors(Builder::STAGE_FINALIZE) as $visitor){
274 274
             $builder->addVisitor($visitor, Builder::STAGE_FINALIZE);
275 275
         }
276 276
 
277
-        foreach ($this->getVisitors(Builder::STAGE_COMPILE) as $visitor) {
277
+        foreach ($this->getVisitors(Builder::STAGE_COMPILE) as $visitor){
278 278
             $builder->addVisitor($visitor, Builder::STAGE_COMPILE);
279 279
         }
280 280
 
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
     private function getVisitors(int $stage): iterable
288 288
     {
289 289
         $result = [];
290
-        foreach ($this->config->getVisitors($stage) as $visitor) {
291
-            if ($visitor instanceof Autowire) {
290
+        foreach ($this->config->getVisitors($stage) as $visitor){
291
+            if ($visitor instanceof Autowire){
292 292
                 $result[] = $visitor->resolve($this->container->get(FactoryInterface::class));
293 293
                 continue;
294 294
             }
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
     private function getProcessors(): iterable
306 306
     {
307 307
         $result = [];
308
-        foreach ($this->config->getProcessors() as $processor) {
309
-            if ($processor instanceof Autowire) {
308
+        foreach ($this->config->getProcessors() as $processor){
309
+            if ($processor instanceof Autowire){
310 310
                 $result[] = $processor->resolve($this->container->get(FactoryInterface::class));
311 311
                 continue;
312 312
             }
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
     private function getDirectives(): iterable
324 324
     {
325 325
         $result = [];
326
-        foreach ($this->config->getDirectives() as $directive) {
327
-            if ($directive instanceof Autowire) {
326
+        foreach ($this->config->getDirectives() as $directive){
327
+            if ($directive instanceof Autowire){
328 328
                 $result[] = $directive->resolve($this->container->get(FactoryInterface::class));
329 329
                 continue;
330 330
             }
Please login to merge, or discard this patch.
src/Validation/src/ValidationProvider.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function __construct(
17 17
         private readonly InvokerInterface $invoker
18
-    ) {
18
+    ){
19 19
     }
20 20
 
21 21
     /**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function getValidation(string $name, array $params = []): ValidationInterface
33 33
     {
34
-        if (!isset($this->resolvers[$name])) {
34
+        if (!isset($this->resolvers[$name])){
35 35
             throw new ValidationException(\sprintf('Validation with name `%s` is not registered.', $name));
36 36
         }
37 37
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
      */
32 32
     public function getValidation(string $name, array $params = []): ValidationInterface
33 33
     {
34
-        if (!isset($this->resolvers[$name])) {
34
+        if (!isset($this->resolvers[$name]))
35
+        {
35 36
             throw new ValidationException(\sprintf('Validation with name `%s` is not registered.', $name));
36 37
         }
37 38
 
Please login to merge, or discard this patch.
src/Validation/src/Bootloader/ValidationBootloader.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function __construct(
28 28
         private readonly ConfiguratorInterface $config
29
-    ) {
29
+    ){
30 30
     }
31 31
 
32 32
     public function init(): void
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function setDefaultValidator(string $name): void
43 43
     {
44
-        if ($this->config->getConfig(ValidationConfig::CONFIG)['defaultValidator'] === null) {
44
+        if ($this->config->getConfig(ValidationConfig::CONFIG)['defaultValidator'] === null){
45 45
             $this->config->modify(ValidationConfig::CONFIG, new Set('defaultValidator', $name));
46 46
         }
47 47
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         ValidationConfig $config,
54 54
         ValidationProviderInterface $provider
55 55
     ): ValidationInterface {
56
-        if ($config->getDefaultValidator() === null) {
56
+        if ($config->getDefaultValidator() === null){
57 57
             throw new ValidationException('Default Validator is not configured.');
58 58
         }
59 59
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function setDefaultValidator(string $name): void
43 43
     {
44
-        if ($this->config->getConfig(ValidationConfig::CONFIG)['defaultValidator'] === null) {
44
+        if ($this->config->getConfig(ValidationConfig::CONFIG)['defaultValidator'] === null)
45
+        {
45 46
             $this->config->modify(ValidationConfig::CONFIG, new Set('defaultValidator', $name));
46 47
         }
47 48
     }
@@ -53,7 +54,8 @@  discard block
 block discarded – undo
53 54
         ValidationConfig $config,
54 55
         ValidationProviderInterface $provider
55 56
     ): ValidationInterface {
56
-        if ($config->getDefaultValidator() === null) {
57
+        if ($config->getDefaultValidator() === null)
58
+        {
57 59
             throw new ValidationException('Default Validator is not configured.');
58 60
         }
59 61
 
Please login to merge, or discard this patch.
src/Framework/Filter/ValidationHandlerMiddleware.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@
 block discarded – undo
27 27
     public function __construct(
28 28
         ContainerInterface $container,
29 29
         ?ErrorsRendererInterface $renderErrors = null
30
-    ) {
30
+    ){
31 31
         $this->renderErrors = $renderErrors ?? $container->get(JsonErrorsRenderer::class);
32 32
     }
33 33
 
34 34
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
35 35
     {
36
-        try {
36
+        try{
37 37
             return $handler->handle($request);
38
-        } catch (ValidationException $e) {
38
+        }catch (ValidationException $e){
39 39
             return $this->renderErrors->render($e->errors, $e->context);
40 40
         }
41 41
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,12 @@
 block discarded – undo
33 33
 
34 34
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
35 35
     {
36
-        try {
36
+        try
37
+        {
37 38
             return $handler->handle($request);
38
-        } catch (ValidationException $e) {
39
+        }
40
+        catch (ValidationException $e)
41
+        {
39 42
             return $this->renderErrors->render($e->errors, $e->context);
40 43
         }
41 44
     }
Please login to merge, or discard this patch.
src/Framework/Filter/JsonErrorsRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function __construct(
14 14
         private readonly ResponseWrapper $wrapper
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     public function render(array $errors, mixed $context = null): ResponseInterface
Please login to merge, or discard this patch.
src/Queue/src/Options.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
      * @param non-empty-string $name
108 108
      * @param non-empty-string|array<non-empty-string> $value
109 109
      */
110
-    public function withHeader(string $name, string|array $value): self
110
+    public function withHeader(string $name, string | array $value): self
111 111
     {
112 112
         $value = \is_iterable($value) ? $value : [$value];
113 113
 
114 114
         $self = clone $this;
115 115
         $self->headers[$name] = [];
116 116
 
117
-        foreach ($value as $item) {
117
+        foreach ($value as $item){
118 118
             $self->headers[$name][] = $item;
119 119
         }
120 120
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @param non-empty-string $name
126 126
      * @param non-empty-string|array<non-empty-string> $value
127 127
      */
128
-    public function withAddedHeader(string $name, string|array $value): self
128
+    public function withAddedHeader(string $name, string | array $value): self
129 129
     {
130 130
         /** @var iterable<non-empty-string> $value */
131 131
         $value = \is_iterable($value) ? $value : [$value];
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         /** @var array<non-empty-string> $headers */
134 134
         $headers = $this->headers[$name] ?? [];
135 135
 
136
-        foreach ($value as $item) {
136
+        foreach ($value as $item){
137 137
             $headers[] = $item;
138 138
         }
139 139
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function withoutHeader(string $name): self
147 147
     {
148
-        if (!isset($this->headers[$name])) {
148
+        if (!isset($this->headers[$name])){
149 149
             return $this;
150 150
         }
151 151
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,8 @@  discard block
 block discarded – undo
114 114
         $self = clone $this;
115 115
         $self->headers[$name] = [];
116 116
 
117
-        foreach ($value as $item) {
117
+        foreach ($value as $item)
118
+        {
118 119
             $self->headers[$name][] = $item;
119 120
         }
120 121
 
@@ -133,7 +134,8 @@  discard block
 block discarded – undo
133 134
         /** @var array<non-empty-string> $headers */
134 135
         $headers = $this->headers[$name] ?? [];
135 136
 
136
-        foreach ($value as $item) {
137
+        foreach ($value as $item)
138
+        {
137 139
             $headers[] = $item;
138 140
         }
139 141
 
@@ -145,7 +147,8 @@  discard block
 block discarded – undo
145 147
      */
146 148
     public function withoutHeader(string $name): self
147 149
     {
148
-        if (!isset($this->headers[$name])) {
150
+        if (!isset($this->headers[$name]))
151
+        {
149 152
             return $this;
150 153
         }
151 154
 
Please login to merge, or discard this patch.
src/Core/tests/Internal/Resolver/CommonCasesTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $this->expectExceptionMessage('Enum `Spiral\Tests\Core\Stub\EnumObject` can not be constructed.');
64 64
 
65 65
         $this->resolveClosure(
66
-            static function (EnumObject $enum) {},
66
+            static function (EnumObject $enum){},
67 67
         );
68 68
     }
69 69
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         );
76 76
 
77 77
         $this->resolveClosure(
78
-            static function (TestTrait $enum) {},
78
+            static function (TestTrait $enum){},
79 79
         );
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,9 @@  discard block
 block discarded – undo
63 63
         $this->expectExceptionMessage('Enum `Spiral\Tests\Core\Stub\EnumObject` can not be constructed.');
64 64
 
65 65
         $this->resolveClosure(
66
-            static function (EnumObject $enum) {},
66
+            static function (EnumObject $enum)
67
+            {
68
+},
67 69
         );
68 70
     }
69 71
 
@@ -75,7 +77,9 @@  discard block
 block discarded – undo
75 77
         );
76 78
 
77 79
         $this->resolveClosure(
78
-            static function (TestTrait $enum) {},
80
+            static function (TestTrait $enum)
81
+            {
82
+},
79 83
         );
80 84
     }
81 85
 }
Please login to merge, or discard this patch.
src/Queue/src/ExtendedOptionsInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
      * @param non-empty-string $name
33 33
      * @param non-empty-string|array<non-empty-string> $value
34 34
      */
35
-    public function withHeader(string $name, string|array $value): self;
35
+    public function withHeader(string $name, string | array $value): self;
36 36
 
37 37
     /**
38 38
      * @param non-empty-string $name
39 39
      * @param non-empty-string|array<non-empty-string> $value
40 40
      */
41
-    public function withAddedHeader(string $name, string|array $value): self;
41
+    public function withAddedHeader(string $name, string | array $value): self;
42 42
 
43 43
     /**
44 44
      * @param non-empty-string $name
Please login to merge, or discard this patch.
src/Queue/src/Job/CallableJob.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 {
13 13
     public function __construct(
14 14
         private readonly InvokerInterface $invoker
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     public function handle(string $name, string $id, array $payload, array $headers = []): void
19 19
     {
20
-        if (!isset($payload['callback'])) {
20
+        if (!isset($payload['callback'])){
21 21
             throw new InvalidArgumentException('Payload `callback` key is required.');
22 22
         }
23 23
 
24
-        if (!$payload['callback'] instanceof \Closure) {
24
+        if (!$payload['callback'] instanceof \Closure){
25 25
             throw new InvalidArgumentException('Payload `callback` key value type should be a closure.');
26 26
         }
27 27
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,13 @@
 block discarded – undo
17 17
 
18 18
     public function handle(string $name, string $id, array $payload, array $headers = []): void
19 19
     {
20
-        if (!isset($payload['callback'])) {
20
+        if (!isset($payload['callback']))
21
+        {
21 22
             throw new InvalidArgumentException('Payload `callback` key is required.');
22 23
         }
23 24
 
24
-        if (!$payload['callback'] instanceof \Closure) {
25
+        if (!$payload['callback'] instanceof \Closure)
26
+        {
25 27
             throw new InvalidArgumentException('Payload `callback` key value type should be a closure.');
26 28
         }
27 29
 
Please login to merge, or discard this patch.