@@ -19,5 +19,5 @@ |
||
19 | 19 | /** |
20 | 20 | * @return DateTime gets the definition of this datetime value |
21 | 21 | */ |
22 | - public function getValue(): DateTime ; |
|
22 | + public function getValue(): DateTime; |
|
23 | 23 | } |
@@ -17,5 +17,5 @@ |
||
17 | 17 | /** |
18 | 18 | * @return float gets the definition of this floating value |
19 | 19 | */ |
20 | - public function getValue(): float ; |
|
20 | + public function getValue(): float; |
|
21 | 21 | } |
@@ -17,5 +17,5 @@ |
||
17 | 17 | /** |
18 | 18 | * @return float gets the definition of this decimal value |
19 | 19 | */ |
20 | - public function getValue(): float ; |
|
20 | + public function getValue(): float; |
|
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; |
@@ -96,7 +96,7 @@ |
||
96 | 96 | if (count($set1) != count($set2)) { |
97 | 97 | return false; |
98 | 98 | } |
99 | - for ($i = count($set1) -1; $i > -1; --$i) { |
|
99 | + for ($i = count($set1) - 1; $i > -1; --$i) { |
|
100 | 100 | if ($set1[$i] !== $set2[$i]) { |
101 | 101 | return false; |
102 | 102 | } |
@@ -20,11 +20,11 @@ |
||
20 | 20 | } |
21 | 21 | public static function getCycleSentinel(): ?stdClass |
22 | 22 | { |
23 | - return (object)[]; |
|
23 | + return (object) []; |
|
24 | 24 | } |
25 | 25 | public static function getSecondPassCycleSentinel(): ?stdClass |
26 | 26 | { |
27 | - return (object)[]; |
|
27 | + return (object) []; |
|
28 | 28 | } |
29 | 29 | public static function GetBoxed(bool $value) |
30 | 30 | { |
@@ -11,5 +11,5 @@ |
||
11 | 11 | |
12 | 12 | public $End1Annotations; |
13 | 13 | |
14 | - public $End2Annotations ; |
|
14 | + public $End2Annotations; |
|
15 | 15 | } |
@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | /** |
13 | 13 | * @var IDirectValueAnnotation |
14 | 14 | */ |
15 | - public $Annotations ; |
|
15 | + public $Annotations; |
|
16 | 16 | /** |
17 | 17 | * @var IDirectValueAnnotation |
18 | 18 | */ |
19 | - public $End1Annotations ; |
|
19 | + public $End1Annotations; |
|
20 | 20 | /** |
21 | 21 | * @var IDirectValueAnnotation |
22 | 22 | */ |
@@ -24,5 +24,5 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * @var IDirectValueAnnotation |
26 | 26 | */ |
27 | - public $ConstraintAnnotations ; |
|
27 | + public $ConstraintAnnotations; |
|
28 | 28 | } |