@@ -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; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | ); |
35 | 35 | break; |
36 | 36 | |
37 | - case SchemaElementKind::Function(): |
|
37 | + case SchemaElementKind::function(): |
|
38 | 38 | InterfaceValidator::CollectErrors( |
39 | 39 | InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
40 | 40 | $item, |
@@ -33,7 +33,7 @@ |
||
33 | 33 | ); |
34 | 34 | break; |
35 | 35 | |
36 | - case SchemaElementKind::Function(): |
|
36 | + case SchemaElementKind::Function (): |
|
37 | 37 | InterfaceValidator::CollectErrors( |
38 | 38 | InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
39 | 39 | $item, |
@@ -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 | { |
@@ -86,7 +86,7 @@ |
||
86 | 86 | $schema = null; |
87 | 87 | if (!array_key_exists($namespaceName, $this->modelSchemas)) { |
88 | 88 | $schema = new EdmSchema($namespaceName); |
89 | - $this->modelSchemas[$namespaceName] = $schema; |
|
89 | + $this->modelSchemas[$namespaceName] = $schema; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | $this->modelSchemas[$namespaceName]->addSchemaElement($element); |
@@ -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 | } |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | |
1294 | 1294 | // Association Set |
1295 | 1295 | if (!($this->model->GetAssociationSetName($thisEntitySet, $thisNavprop) == |
1296 | - $this->model->GetAssociationSetName($thatEntitySet, $thatNavprop) && |
|
1296 | + $this->model->GetAssociationSetName($thatEntitySet, $thatNavprop) && |
|
1297 | 1297 | $this->model->GetAssociationFullName($thisNavprop) == $this->model->GetAssociationFullName($thatNavprop))) { |
1298 | 1298 | return false; |
1299 | 1299 | } |
@@ -1318,7 +1318,7 @@ discard block |
||
1318 | 1318 | } |
1319 | 1319 | |
1320 | 1320 | if (!($this->model->GetAssociationEndName($thisNavprop->getPartner()) == |
1321 | - $this->model->GetAssociationEndName($thatNavprop->getPartner()) && |
|
1321 | + $this->model->GetAssociationEndName($thatNavprop->getPartner()) && |
|
1322 | 1322 | $thisOtherEntitySet->getName() == $thatOtherEntitySet->getName())) { |
1323 | 1323 | return false; |
1324 | 1324 | } |
@@ -131,8 +131,7 @@ discard block |
||
131 | 131 | $alias = null; |
132 | 132 | if ($this->namespaceAliasMappings != null) { |
133 | 133 | $alias = array_key_exists($element->getNamespace(), $this->namespaceAliasMappings) ? |
134 | - $this->namespaceAliasMappings[$element->getNamespace()] : |
|
135 | - null; |
|
134 | + $this->namespaceAliasMappings[$element->getNamespace()] : null; |
|
136 | 135 | } |
137 | 136 | |
138 | 137 | $this->schemaWriter->WriteSchemaElementHeader($element, $alias, $mappings); |
@@ -602,7 +601,7 @@ discard block |
||
602 | 601 | protected function ProcessPropertyReferenceExpression(IPropertyReferenceExpression $expression): void |
603 | 602 | { |
604 | 603 | $this->BeginElement($expression, [$this->schemaWriter, 'WritePropertyReferenceExpressionElementHeader']); |
605 | - if ($expression->getBase()!= null) { |
|
604 | + if ($expression->getBase() != null) { |
|
606 | 605 | $this->VisitExpression($expression->getBase()); |
607 | 606 | } |
608 | 607 | |
@@ -933,7 +932,7 @@ discard block |
||
933 | 932 | /** |
934 | 933 | * @var IDirectValueAnnotation[] $end2Annotations |
935 | 934 | */ |
936 | - $end2Annotations =[]; |
|
935 | + $end2Annotations = []; |
|
937 | 936 | $this->model->GetAssociationSetAnnotations( |
938 | 937 | $entitySet, |
939 | 938 | $property, |
@@ -1208,10 +1207,10 @@ discard block |
||
1208 | 1207 | return false; |
1209 | 1208 | } |
1210 | 1209 | |
1211 | - $thisAssociationAnnotations =[]; |
|
1210 | + $thisAssociationAnnotations = []; |
|
1212 | 1211 | $thisEnd1Annotations = []; |
1213 | - $thisEnd2Annotations =[]; |
|
1214 | - $thisConstraintAnnotations =[]; |
|
1212 | + $thisEnd2Annotations = []; |
|
1213 | + $thisConstraintAnnotations = []; |
|
1215 | 1214 | $this->model->GetAssociationAnnotations( |
1216 | 1215 | $thisPrimary, |
1217 | 1216 | $thisAssociationAnnotations, |
@@ -1223,7 +1222,7 @@ discard block |
||
1223 | 1222 | $thatAssociationAnnotations = []; |
1224 | 1223 | $thatEnd1Annotations = []; |
1225 | 1224 | $thatEnd2Annotations = []; |
1226 | - $thatConstraintAnnotations =[]; |
|
1225 | + $thatConstraintAnnotations = []; |
|
1227 | 1226 | $this->model->GetAssociationAnnotations( |
1228 | 1227 | $thatPrimary, |
1229 | 1228 | $thatAssociationAnnotations, |
@@ -1337,8 +1336,8 @@ discard block |
||
1337 | 1336 | ); |
1338 | 1337 | |
1339 | 1338 | $thatAssociationSetAnnotations = []; |
1340 | - $thatEnd1Annotations =[]; |
|
1341 | - $thatEnd2Annotations =[]; |
|
1339 | + $thatEnd1Annotations = []; |
|
1340 | + $thatEnd2Annotations = []; |
|
1342 | 1341 | $this->model->GetAssociationSetAnnotations( |
1343 | 1342 | $thatEntitySet, |
1344 | 1343 | $thatNavprop, |