@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | // If we don't have the applied function we just assume that it will work. |
| 205 | 205 | $discoveredErrors = []; |
| 206 | 206 | return true; |
| 207 | - case ExpressionKind::If(): |
|
| 207 | + case ExpressionKind::If (): |
|
| 208 | 208 | assert($expression instanceof IIfExpression); |
| 209 | 209 | return self::tryAssertIfAsType($expression, $type, $context, $matchExactly, $discoveredErrors); |
| 210 | 210 | case ExpressionKind::IsType(): |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | iterable &$discoveredErrors |
| 307 | 307 | ): bool { |
| 308 | 308 | if (!$type->isPrimitive()) { |
| 309 | - $discoveredErrors = [ |
|
| 309 | + $discoveredErrors = [ |
|
| 310 | 310 | new EdmError( |
| 311 | 311 | $expression->location(), |
| 312 | 312 | EdmErrorCode::PrimitiveConstantExpressionNotValidForNonPrimitiveType(), |
@@ -770,7 +770,7 @@ discard block |
||
| 770 | 770 | return self::tryAssertIntegerConstantInRange( |
| 771 | 771 | $expression, |
| 772 | 772 | (int)-9223372036854775808, |
| 773 | - (int)999999999999, |
|
| 773 | + (int) 999999999999, |
|
| 774 | 774 | $discoveredErrors |
| 775 | 775 | ); |
| 776 | 776 | case PrimitiveTypeKind::Int32(): |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | $discoveredErrors |
| 803 | 803 | ); |
| 804 | 804 | default: |
| 805 | - $discoveredErrors = [ |
|
| 805 | + $discoveredErrors = [ |
|
| 806 | 806 | new EdmError( |
| 807 | 807 | $expression->location(), |
| 808 | 808 | EdmErrorCode::ExpressionPrimitiveKindNotValidForAssertedType(), |
@@ -926,7 +926,7 @@ discard block |
||
| 926 | 926 | |
| 927 | 927 | if ($expressionType->getTypeKind()->isPrimitive() && $assertedType->getTypeKind()->isPrimitive()) { |
| 928 | 928 | $primitiveExpressionType = $expressionType; |
| 929 | - $primitiveAssertedType = $assertedType ; |
|
| 929 | + $primitiveAssertedType = $assertedType; |
|
| 930 | 930 | assert($primitiveExpressionType instanceof IPrimitiveType); |
| 931 | 931 | assert($primitiveAssertedType instanceof IPrimitiveType); |
| 932 | 932 | if (!self::promotesTo( |
@@ -330,9 +330,9 @@ |
||
| 330 | 330 | private static function setProperties(string $ranges, int $value): void |
| 331 | 331 | { |
| 332 | 332 | assert(mb_strlen($ranges, 'UTF-8') % 2 === 0); |
| 333 | - for ($p = 0; $p < mb_strlen($ranges, 'UTF-8'); $p +=2) { |
|
| 333 | + for ($p = 0; $p < mb_strlen($ranges, 'UTF-8'); $p += 2) { |
|
| 334 | 334 | $str1 = mb_substr($ranges, $p, 1, 'UTF-8'); |
| 335 | - $str2 = mb_substr($ranges, $p+1, 1, 'UTF-8'); |
|
| 335 | + $str2 = mb_substr($ranges, $p + 1, 1, 'UTF-8'); |
|
| 336 | 336 | for ($i = mb_ord($str1), |
| 337 | 337 | $last = mb_ord($str2); $i <= $last; $i++) { |
| 338 | 338 | if (!isset(self::$s_CharProperties[$i])) { |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | ); |
| 29 | 29 | |
| 30 | 30 | if (null !== $type->getBaseType()) { |
| 31 | - $visitedTypes = new HashSetInternal(); |
|
| 31 | + $visitedTypes = new HashSetInternal(); |
|
| 32 | 32 | $visitedTypes->add($type); |
| 33 | 33 | /** @var IStructuredType|null $currentBaseType */ |
| 34 | 34 | for ($currentBaseType = $type->getBaseType(); null !== $currentBaseType; $currentBaseType = $currentBaseType->getBaseType() |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | foreach ($annotations as $annotation) { |
| 28 | 28 | assert($annotation instanceof IDirectValueAnnotation); |
| 29 | 29 | EdmUtil::checkArgumentNull($annotation->location(), 'annotation->Location'); |
| 30 | - if (! $annotationNameSet->add($annotation->getNamespaceUri() . ':' . $annotation->getName())) { |
|
| 30 | + if (!$annotationNameSet->add($annotation->getNamespaceUri() . ':' . $annotation->getName())) { |
|
| 31 | 31 | EdmUtil::checkArgumentNull($annotation->location(), 'annotation->Location'); |
| 32 | 32 | $context->addError( |
| 33 | 33 | $annotation->location(), |
@@ -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 | |