@@ -14,7 +14,7 @@ |
||
14 | 14 | assert($typeRef instanceof ICollectionTypeReference); |
15 | 15 | return null !== $typeRef->getDefinition() && |
16 | 16 | !$typeRef->getDefinition()->getTypeKind()->isCollection() ? |
17 | - [ InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
17 | + [InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function forType(): string |
@@ -1350,8 +1350,7 @@ discard block |
||
1350 | 1350 | */ |
1351 | 1351 | public function writeOptionalAttribute(string $attribute, $value, $defaultValue, callable $toXml): void |
1352 | 1352 | { |
1353 | - $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
1354 | - new ReflectionFunction($toXml); |
|
1353 | + $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml); |
|
1355 | 1354 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1356 | 1355 | assert( |
1357 | 1356 | 1 === count(($stem)->getParameters()), |
@@ -1359,8 +1358,7 @@ discard block |
||
1359 | 1358 | ); |
1360 | 1359 | $stemType = $stem->getReturnType(); |
1361 | 1360 | $name = $stemType instanceof ReflectionNamedType ? |
1362 | - $stemType->getName() : |
|
1363 | - strval($stemType); |
|
1361 | + $stemType->getName() : strval($stemType); |
|
1364 | 1362 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1365 | 1363 | assert( |
1366 | 1364 | 'string' === $name, |
@@ -1379,8 +1377,7 @@ discard block |
||
1379 | 1377 | */ |
1380 | 1378 | public function writeRequiredAttribute(string $attribute, $value, callable $toXml): void |
1381 | 1379 | { |
1382 | - $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
1383 | - new ReflectionFunction($toXml); |
|
1380 | + $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml); |
|
1384 | 1381 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1385 | 1382 | assert( |
1386 | 1383 | 1 === count($stem->getParameters()), |
@@ -1388,8 +1385,7 @@ discard block |
||
1388 | 1385 | ); |
1389 | 1386 | $stemType = $stem->getReturnType(); |
1390 | 1387 | $name = $stemType instanceof ReflectionNamedType ? |
1391 | - $stemType->getName() : |
|
1392 | - strval($stemType); |
|
1388 | + $stemType->getName() : strval($stemType); |
|
1393 | 1389 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1394 | 1390 | assert( |
1395 | 1391 | 'string' === $name, |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $primitive = $typeRef->getDefinition(); |
17 | 17 | assert($primitive instanceof IPrimitiveType); |
18 | 18 | return null !== $typeRef->getDefinition() && !$primitive->getPrimitiveKind()->isSpatial() |
19 | - ? [ InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
19 | + ? [InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function forType(): string |
@@ -37,7 +37,7 @@ |
||
37 | 37 | string $type = null |
38 | 38 | ): iterable { |
39 | 39 | assert( |
40 | - null === $term || $term instanceof ITerm || is_string($term), /** @phpstan-ignore-line */ |
|
40 | + null === $term || $term instanceof ITerm || is_string($term), /** @phpstan-ignore-line */ |
|
41 | 41 | '$term should be a string or instanceof iTerm' |
42 | 42 | ); |
43 | 43 | if (null === $term) { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $references[] = $reference; |
25 | 25 | return null; |
26 | 26 | } else { |
27 | - return [ InterfaceValidator::createPropertyMustNotBeNullError($expression, 'ReferencedFunction') ]; |
|
27 | + return [InterfaceValidator::createPropertyMustNotBeNullError($expression, 'ReferencedFunction')]; |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | ): void { |
49 | 49 | $qualifiedName = $element->fullName(); |
50 | 50 | switch ($element->getSchemaElementKind()) { |
51 | - case SchemaElementKind::Function(): |
|
51 | + case SchemaElementKind::Function (): |
|
52 | 52 | assert($element instanceof IFunction); |
53 | 53 | self::addFunction($element, $qualifiedName, $functionGroupDictionary); |
54 | 54 | break; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | ): void { |
49 | 49 | $qualifiedName = $element->fullName(); |
50 | 50 | switch ($element->getSchemaElementKind()) { |
51 | - case SchemaElementKind::Function(): |
|
51 | + case SchemaElementKind::function(): |
|
52 | 52 | assert($element instanceof IFunction); |
53 | 53 | self::addFunction($element, $qualifiedName, $functionGroupDictionary); |
54 | 54 | break; |
@@ -19,11 +19,11 @@ |
||
19 | 19 | } |
20 | 20 | public static function getCycleSentinel(): ?stdClass |
21 | 21 | { |
22 | - return (object)[]; |
|
22 | + return (object) []; |
|
23 | 23 | } |
24 | 24 | public static function getSecondPassCycleSentinel(): ?stdClass |
25 | 25 | { |
26 | - return (object)[]; |
|
26 | + return (object) []; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |