We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -89,21 +89,21 @@ discard block |
||
| 89 | 89 | 'friends' => [ |
| 90 | 90 | [ |
| 91 | 91 | 'name' => 'Luke Skywalker', |
| 92 | - 'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI',], |
|
| 92 | + 'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI', ], |
|
| 93 | 93 | 'friends' => [ |
| 94 | - ['name' => 'Han Solo',], |
|
| 95 | - ['name' => 'Leia Organa',], |
|
| 96 | - ['name' => 'C-3PO',], |
|
| 97 | - ['name' => 'R2-D2',], |
|
| 94 | + ['name' => 'Han Solo', ], |
|
| 95 | + ['name' => 'Leia Organa', ], |
|
| 96 | + ['name' => 'C-3PO', ], |
|
| 97 | + ['name' => 'R2-D2', ], |
|
| 98 | 98 | ], |
| 99 | 99 | ], |
| 100 | 100 | [ |
| 101 | 101 | 'name' => 'Han Solo', |
| 102 | 102 | 'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI'], |
| 103 | 103 | 'friends' => [ |
| 104 | - ['name' => 'Luke Skywalker',], |
|
| 104 | + ['name' => 'Luke Skywalker', ], |
|
| 105 | 105 | ['name' => 'Leia Organa'], |
| 106 | - ['name' => 'R2-D2',], |
|
| 106 | + ['name' => 'R2-D2', ], |
|
| 107 | 107 | ] |
| 108 | 108 | ], |
| 109 | 109 | [ |
@@ -111,10 +111,10 @@ discard block |
||
| 111 | 111 | 'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI'], |
| 112 | 112 | 'friends' => |
| 113 | 113 | [ |
| 114 | - ['name' => 'Luke Skywalker',], |
|
| 115 | - ['name' => 'Han Solo',], |
|
| 116 | - ['name' => 'C-3PO',], |
|
| 117 | - ['name' => 'R2-D2',], |
|
| 114 | + ['name' => 'Luke Skywalker', ], |
|
| 115 | + ['name' => 'Han Solo', ], |
|
| 116 | + ['name' => 'C-3PO', ], |
|
| 117 | + ['name' => 'R2-D2', ], |
|
| 118 | 118 | ], |
| 119 | 119 | ], |
| 120 | 120 | ], |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | |
| 100 | 100 | public function getSkeletonDirs(bool $withDefault = true): array |
| 101 | 101 | { |
| 102 | - $skeletonDirs = $this->skeletonDirs ; |
|
| 102 | + $skeletonDirs = $this->skeletonDirs; |
|
| 103 | 103 | |
| 104 | 104 | if ($withDefault) { |
| 105 | 105 | $skeletonDirs[] = __DIR__.'/../Resources/skeleton'; |
@@ -299,14 +299,14 @@ discard block |
||
| 299 | 299 | $code = $this->processTemplatePlaceHoldersReplacements('ValidatorCode', $rules, self::DEFERRED_PLACEHOLDERS); |
| 300 | 300 | $code = \ltrim($this->prefixCodeWithSpaces($code, 2)); |
| 301 | 301 | |
| 302 | - return $code . "\n\n<spaces><spaces>"; |
|
| 302 | + return $code."\n\n<spaces><spaces>"; |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | protected function generateClassValidation(array $config): string |
| 306 | 306 | { |
| 307 | 307 | $config = $config['class'] ?? $config['validation'] ?? null; |
| 308 | 308 | |
| 309 | - if(!$config) return 'null'; |
|
| 309 | + if (!$config) return 'null'; |
|
| 310 | 310 | |
| 311 | 311 | $code = $this->processTemplatePlaceHoldersReplacements('ValidationConfig', $config, self::DEFERRED_PLACEHOLDERS); |
| 312 | 312 | $code = \ltrim($this->prefixCodeWithSpaces($code, 2)); |
@@ -351,11 +351,11 @@ discard block |
||
| 351 | 351 | { |
| 352 | 352 | $constraints = $values['constraints'] ?? $values['validation']['constraints'] ?? null; |
| 353 | 353 | |
| 354 | - if(!is_array($constraints)) { |
|
| 354 | + if (!is_array($constraints)) { |
|
| 355 | 355 | return 'null'; |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | - $this->addUseStatement(Assert::class . ' as Assert'); |
|
| 358 | + $this->addUseStatement(Assert::class.' as Assert'); |
|
| 359 | 359 | |
| 360 | 360 | $code = ''; |
| 361 | 361 | foreach ($constraints as $key => $constraint) { |
@@ -393,9 +393,9 @@ discard block |
||
| 393 | 393 | |
| 394 | 394 | // Security constraint |
| 395 | 395 | if ('UserPassword' === $name) { |
| 396 | - $FQCN = SecurityAssert::class . "\\$name"; |
|
| 396 | + $FQCN = SecurityAssert::class."\\$name"; |
|
| 397 | 397 | $prefix = 'SecurityAssert\\'; |
| 398 | - $this->addUseStatement(SecurityAssert::class . ' as SecurityAssert'); |
|
| 398 | + $this->addUseStatement(SecurityAssert::class.' as SecurityAssert'); |
|
| 399 | 399 | } |
| 400 | 400 | // Custom constraint |
| 401 | 401 | else if (false !== strpos($name, '\\')) { |
@@ -408,10 +408,10 @@ discard block |
||
| 408 | 408 | // Standart constraint |
| 409 | 409 | else { |
| 410 | 410 | $prefix = 'Assert\\'; |
| 411 | - $FQCN = Assert::class . "\\$name"; |
|
| 411 | + $FQCN = Assert::class."\\$name"; |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | - if(!class_exists($FQCN)) { |
|
| 414 | + if (!class_exists($FQCN)) { |
|
| 415 | 415 | throw new RuntimeException("Constraint class '$FQCN' doesn't exist."); |
| 416 | 416 | } |
| 417 | 417 | |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | ; |
| 556 | 556 | |
| 557 | 557 | if ($value !== end($array)) { |
| 558 | - $code .= ', '; |
|
| 558 | + $code .= ', '; |
|
| 559 | 559 | } |
| 560 | 560 | } |
| 561 | 561 | |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | $properties = []; |
| 613 | 613 | |
| 614 | 614 | foreach ($value['args'] ?? [] as $name => $arg) { |
| 615 | - if(empty($arg['validation'])) { |
|
| 615 | + if (empty($arg['validation'])) { |
|
| 616 | 616 | $properties[$name] = null; |
| 617 | 617 | continue; |
| 618 | 618 | } |
@@ -306,7 +306,9 @@ discard block |
||
| 306 | 306 | { |
| 307 | 307 | $config = $config['class'] ?? $config['validation'] ?? null; |
| 308 | 308 | |
| 309 | - if(!$config) return 'null'; |
|
| 309 | + if(!$config) { |
|
| 310 | + return 'null'; |
|
| 311 | + } |
|
| 310 | 312 | |
| 311 | 313 | $code = $this->processTemplatePlaceHoldersReplacements('ValidationConfig', $config, self::DEFERRED_PLACEHOLDERS); |
| 312 | 314 | $code = \ltrim($this->prefixCodeWithSpaces($code, 2)); |
@@ -573,7 +575,9 @@ discard block |
||
| 573 | 575 | protected static function isNumericArray(array $array): bool |
| 574 | 576 | { |
| 575 | 577 | foreach ($array as $k => $a) { |
| 576 | - if (!is_int($k)) return false; |
|
| 578 | + if (!is_int($k)) { |
|
| 579 | + return false; |
|
| 580 | + } |
|
| 577 | 581 | } |
| 578 | 582 | return true; |
| 579 | 583 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $error = $event->getError()->getPrevious(); |
| 18 | 18 | |
| 19 | - if($error instanceof ArgumentsValidationException) |
|
| 19 | + if ($error instanceof ArgumentsValidationException) |
|
| 20 | 20 | { |
| 21 | 21 | $state = []; |
| 22 | 22 | $code = []; |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | $current = $this->__parent; |
| 127 | 127 | |
| 128 | 128 | while (null !== $current) { |
| 129 | - if($current->getName() === $name) { |
|
| 129 | + if ($current->getName() === $name) { |
|
| 130 | 130 | return $current; |
| 131 | 131 | } else { |
| 132 | 132 | $current = $current->getParent(); |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | $this->resolverArgs = $this->mapResolverArgs($resolverArgs); |
| 88 | 88 | $this->info = $this->resolverArgs['info']; |
| 89 | 89 | $this->constraintMapping = $mapping; |
| 90 | - $this->validator = $validator; |
|
| 90 | + $this->validator = $validator; |
|
| 91 | 91 | $this->validatorFactory = $factory; |
| 92 | 92 | $this->metadataFactory = new MetadataFactory(); |
| 93 | 93 | } |
@@ -170,7 +170,9 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | foreach ($params ?? [] as $key => $value) { |
| 173 | - if (null === $value) continue; |
|
| 173 | + if (null === $value) { |
|
| 174 | + continue; |
|
| 175 | + } |
|
| 174 | 176 | |
| 175 | 177 | switch ($key) { |
| 176 | 178 | case 'link': |
@@ -186,9 +188,13 @@ discard block |
||
| 186 | 188 | foreach ($propertyMetadata as $memberMetadata) { |
| 187 | 189 | // Allow only constraints specified by the "link" matcher |
| 188 | 190 | if (self::TYPE_GETTER === $type) { |
| 189 | - if (!$memberMetadata instanceof GetterMetadata) continue; |
|
| 191 | + if (!$memberMetadata instanceof GetterMetadata) { |
|
| 192 | + continue; |
|
| 193 | + } |
|
| 190 | 194 | } else if (self::TYPE_PROPERTY === $type) { |
| 191 | - if (!$memberMetadata instanceof PropertyMetadata) continue; |
|
| 195 | + if (!$memberMetadata instanceof PropertyMetadata) { |
|
| 196 | + continue; |
|
| 197 | + } |
|
| 192 | 198 | } |
| 193 | 199 | |
| 194 | 200 | $metadata->addPropertyConstraints($property, $memberMetadata->getConstraints()); |
@@ -254,7 +260,9 @@ discard block |
||
| 254 | 260 | private function applyClassConstraints(ObjectMetadata $metadata, ?array $constraints) |
| 255 | 261 | { |
| 256 | 262 | foreach ($constraints ?? [] as $key => $value) { |
| 257 | - if (null === $value) continue; |
|
| 263 | + if (null === $value) { |
|
| 264 | + continue; |
|
| 265 | + } |
|
| 258 | 266 | |
| 259 | 267 | switch ($key) { |
| 260 | 268 | case 'link': |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'info' => $info |
| 29 | 29 | ] = $arguments; |
| 30 | 30 | |
| 31 | - return function($value) use ($mutateAndGetPayload, $globalVariables, $args, $context, $info) { |
|
| 31 | + return function ($value) use ($mutateAndGetPayload, $globalVariables, $args, $context, $info) { |
|
| 32 | 32 | return $mutateAndGetPayload; |
| 33 | 33 | }; |
| 34 | 34 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'info' => $info |
| 29 | 29 | ] = $arguments; |
| 30 | 30 | |
| 31 | - return function($value) use ($mutateAndGetPayload, $globalVariables, $args, $context, $info) { |
|
| 31 | + return function ($value) use ($mutateAndGetPayload, $globalVariables, $args, $context, $info) { |
|
| 32 | 32 | return $mutateAndGetPayload; |
| 33 | 33 | }; |
| 34 | 34 | } |