@@ -17,5 +17,5 @@ |
||
17 | 17 | /** |
18 | 18 | * @return string[] gets the definition of this binary value |
19 | 19 | */ |
20 | - public function getValue(): array ; |
|
20 | + public function getValue(): array; |
|
21 | 21 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | ); |
173 | 173 | } |
174 | 174 | return self::TryAssertPrimitiveAsType($primitiveValue, $type, $discoveredErrors); |
175 | - case ExpressionKind::Null(): |
|
175 | + case ExpressionKind::null(): |
|
176 | 176 | assert($expression instanceof INullExpression); |
177 | 177 | return self::TryAssertNullAsType($expression, $type, $discoveredErrors); |
178 | 178 | case ExpressionKind::Path(): |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | // If we don't have the applied function we just assume that it will work. |
198 | 198 | $discoveredErrors = []; |
199 | 199 | return true; |
200 | - case ExpressionKind::If(): |
|
200 | + case ExpressionKind::if(): |
|
201 | 201 | assert($expression instanceof IIfExpression); |
202 | 202 | return self::TryAssertIfAsType($expression, $type, $context, $matchExactly, $discoveredErrors); |
203 | 203 | case ExpressionKind::IsType(): |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | // If we don't have the applied function we just assume that it will work. |
200 | 200 | $discoveredErrors = []; |
201 | 201 | return true; |
202 | - case ExpressionKind::If(): |
|
202 | + case ExpressionKind::If (): |
|
203 | 203 | assert($expression instanceof IIfExpression); |
204 | 204 | return self::TryAssertIfAsType($expression, $type, $context, $matchExactly, $discoveredErrors); |
205 | 205 | case ExpressionKind::IsType(): |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | iterable &$discoveredErrors |
298 | 298 | ): bool { |
299 | 299 | if (!$type->IsPrimitive()) { |
300 | - $discoveredErrors = [ |
|
300 | + $discoveredErrors = [ |
|
301 | 301 | new EdmError( |
302 | 302 | $expression->Location(), |
303 | 303 | EdmErrorCode::PrimitiveConstantExpressionNotValidForNonPrimitiveType(), |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | return self::TryAssertIntegerConstantInRange( |
758 | 758 | $expression, |
759 | 759 | (int)-9223372036854775808, |
760 | - (int)999999999999, |
|
760 | + (int) 999999999999, |
|
761 | 761 | $discoveredErrors |
762 | 762 | ); |
763 | 763 | case PrimitiveTypeKind::Int32(): |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | $discoveredErrors |
790 | 790 | ); |
791 | 791 | default: |
792 | - $discoveredErrors = [ |
|
792 | + $discoveredErrors = [ |
|
793 | 793 | new EdmError( |
794 | 794 | $expression->Location(), |
795 | 795 | EdmErrorCode::ExpressionPrimitiveKindNotValidForAssertedType(), |
@@ -909,7 +909,7 @@ discard block |
||
909 | 909 | |
910 | 910 | if ($expressionType->getTypeKind()->isPrimitive() && $assertedType->getTypeKind()->isPrimitive()) { |
911 | 911 | $primitiveExpressionType = $expressionType; |
912 | - $primitiveAssertedType = $assertedType ; |
|
912 | + $primitiveAssertedType = $assertedType; |
|
913 | 913 | assert($primitiveExpressionType instanceof IPrimitiveType); |
914 | 914 | assert($primitiveAssertedType instanceof IPrimitiveType); |
915 | 915 | if (!self::PromotesTo( |
@@ -27,8 +27,7 @@ |
||
27 | 27 | public static function Validate(IModel $root, $versionOrRuleset, array &$errors): bool |
28 | 28 | { |
29 | 29 | $ruleSet = $versionOrRuleset instanceof Version ? |
30 | - ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) : |
|
31 | - $versionOrRuleset; |
|
30 | + ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) : $versionOrRuleset; |
|
32 | 31 | assert($ruleSet instanceof ValidationRuleSet); |
33 | 32 | $errors = InterfaceValidator::ValidateModelStructureAndSemantics($root, $ruleSet); |
34 | 33 | return count($errors) === 0; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | assert($typeRef instanceof IBinaryTypeReference); |
17 | 17 | $primitive = $typeRef->getDefinition(); |
18 | 18 | assert($primitive instanceof IPrimitiveType); |
19 | - return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isBinary() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
19 | + return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isBinary() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function forType(): string |
@@ -17,7 +17,7 @@ |
||
17 | 17 | assert($typeRef instanceof IStringTypeReference); |
18 | 18 | $primitive = $typeRef->getDefinition(); |
19 | 19 | assert($primitive instanceof IPrimitiveType); |
20 | - return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isString() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
20 | + return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isString() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function forType(): string |
@@ -17,7 +17,7 @@ |
||
17 | 17 | assert($typeRef instanceof ITemporalTypeReference); |
18 | 18 | $primitive = $typeRef->getDefinition(); |
19 | 19 | assert($primitive instanceof IPrimitiveType); |
20 | - return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->IsTemporal() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
20 | + return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->IsTemporal() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function forType(): string |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | assert($typeRef instanceof IEntityTypeReference); |
16 | 16 | |
17 | - return $typeRef->getDefinition() != null && !$typeRef->getDefinition()->getTypeKind()->isEntity() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
17 | + return $typeRef->getDefinition() != null && !$typeRef->getDefinition()->getTypeKind()->isEntity() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function forType(): string |
@@ -17,7 +17,7 @@ |
||
17 | 17 | assert($typeRef instanceof ISpatialTypeReference); |
18 | 18 | $primitive = $typeRef->getDefinition(); |
19 | 19 | assert($primitive instanceof IPrimitiveType); |
20 | - return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->IsSpatial() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
20 | + return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->IsSpatial() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function forType(): string |
@@ -16,7 +16,7 @@ |
||
16 | 16 | assert($typeRef instanceof IDecimalTypeReference); |
17 | 17 | $primitive = $typeRef->getDefinition(); |
18 | 18 | assert($primitive instanceof IPrimitiveType); |
19 | - return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isDecimal() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
19 | + return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isDecimal() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function forType(): string |