@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public static function getEdmModelRuleSet(Version $version): self |
161 | 161 | { |
162 | - switch ($version){ |
|
162 | + switch ($version) { |
|
163 | 163 | case Version::v1(): |
164 | 164 | return self::getV1RuleSet(); |
165 | 165 | case Version::v1_1(): |
@@ -187,10 +187,10 @@ discard block |
||
187 | 187 | private function AddRule(ValidationRule $rule):void |
188 | 188 | { |
189 | 189 | $typeName = $rule->getValidatedType(); |
190 | - if(!isset($this->rules[$typeName])){ |
|
190 | + if (!isset($this->rules[$typeName])) { |
|
191 | 191 | $this->rules[$typeName] = []; |
192 | 192 | } |
193 | - if(in_array($rule, $this->rules[$typeName])){ |
|
193 | + if (in_array($rule, $this->rules[$typeName])) { |
|
194 | 194 | throw new InvalidOperationException(StringConst::RuleSet_DuplicateRulesExistInRuleSet()); |
195 | 195 | } |
196 | 196 | $this->rules[$typeName][] = $rule; |
@@ -322,11 +322,11 @@ discard block |
||
322 | 322 | |
323 | 323 | private static function getV1_1RuleSet(): self{ |
324 | 324 | $filteredBase = []; |
325 | - foreach(self::getBaseRuleSet() as $baseRule){ |
|
326 | - if( |
|
325 | + foreach (self::getBaseRuleSet() as $baseRule) { |
|
326 | + if ( |
|
327 | 327 | $baseRule instanceof ComplexTypeInvalidAbstractComplexType || |
328 | 328 | $baseRule instanceof ComplexTypeInvalidPolymorphicComplexType |
329 | - ){ |
|
329 | + ) { |
|
330 | 330 | continue; |
331 | 331 | } |
332 | 332 | $filteredBase[] = $baseRule; |
@@ -357,11 +357,11 @@ discard block |
||
357 | 357 | private static function getV1_2RuleSet(): self |
358 | 358 | { |
359 | 359 | $filteredBase = []; |
360 | - foreach(self::getBaseRuleSet() as $baseRule){ |
|
361 | - if( |
|
360 | + foreach (self::getBaseRuleSet() as $baseRule) { |
|
361 | + if ( |
|
362 | 362 | $baseRule instanceof ComplexTypeInvalidAbstractComplexType || |
363 | 363 | $baseRule instanceof ComplexTypeInvalidPolymorphicComplexType |
364 | - ){ |
|
364 | + ) { |
|
365 | 365 | continue; |
366 | 366 | } |
367 | 367 | $filteredBase[] = $baseRule; |
@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | |
44 | 44 | assert( |
45 | - Asserts::assertSignatureMatches(function(IEdmElement $one): bool{}, $isBad, '$isBad') |
|
45 | + Asserts::assertSignatureMatches(function (IEdmElement $one): bool{}, $isBad, '$isBad') |
|
46 | 46 | ); |
47 | 47 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
48 | 48 | assert( |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | $target = $annotation->getTarget(); |
35 | 35 | $foundTarget = false; |
36 | 36 | |
37 | - $entityContainer = $target ; |
|
38 | - if ( $entityContainer instanceof IEntityContainer) |
|
37 | + $entityContainer = $target; |
|
38 | + if ($entityContainer instanceof IEntityContainer) |
|
39 | 39 | { |
40 | 40 | $foundTarget = ($context->getModel()->findEntityContainer($entityContainer->FullName()) != null); |
41 | 41 | } |
42 | 42 | else |
43 | 43 | { |
44 | - $entitySet = $target ; |
|
44 | + $entitySet = $target; |
|
45 | 45 | if ($entitySet instanceof IEntitySet) |
46 | 46 | { |
47 | 47 | $container = $entitySet->getContainer(); |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | } |
60 | 60 | else |
61 | 61 | { |
62 | - $term = $target ; |
|
62 | + $term = $target; |
|
63 | 63 | if ($term != null && $term instanceof ITerm) |
64 | 64 | { |
65 | - $foundTarget = ($context->getModel()->FindValueTerm($term->FullName())!= null); |
|
65 | + $foundTarget = ($context->getModel()->FindValueTerm($term->FullName()) != null); |
|
66 | 66 | } |
67 | 67 | else |
68 | 68 | { |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $properties = $structuredType->Properties(); |
29 | 29 | if (count($properties) > 0) |
30 | 30 | { |
31 | - foreach ($properties as $property ) |
|
31 | + foreach ($properties as $property) |
|
32 | 32 | { |
33 | 33 | if ($property != null) |
34 | 34 | { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | assert($binding instanceof IPropertyValueBinding); |
23 | 23 | $errors = null; |
24 | 24 | if ( |
25 | - !ExpressionTypeChecker::tryAssertType( $binding->getValue(), $binding->getBoundProperty()->getType(), $errors) && |
|
25 | + !ExpressionTypeChecker::tryAssertType($binding->getValue(), $binding->getBoundProperty()->getType(), $errors) && |
|
26 | 26 | !$context->checkIsBad($binding) && |
27 | 27 | !$context->checkIsBad($binding->getBoundProperty()) |
28 | 28 | ) |
@@ -26,7 +26,7 @@ |
||
26 | 26 | !$context->checkIsBad($expression->getDeclaredType())) |
27 | 27 | { |
28 | 28 | $discoveredErrors = null; |
29 | - ExpressionTypeChecker::TryAssertRecordAsType($expression, $expression->getDeclaredType(), null, false, $discoveredErrors); |
|
29 | + ExpressionTypeChecker::TryAssertRecordAsType($expression, $expression->getDeclaredType(), null, false, $discoveredErrors); |
|
30 | 30 | foreach ($discoveredErrors as $error) |
31 | 31 | { |
32 | 32 | $context->AddRawError($error); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $containmentFound = false; |
24 | 24 | foreach ($set->getContainer()->EntitySets() as $otherSet) |
25 | 25 | { |
26 | - foreach ( $otherSet->getNavigationTargets() as $mapping) |
|
26 | + foreach ($otherSet->getNavigationTargets() as $mapping) |
|
27 | 27 | { |
28 | 28 | $property = $mapping->getNavigationProperty(); |
29 | 29 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $annotation->Location(), |
30 | 30 | EdmErrorCode::DuplicateDirectValueAnnotationFullName(), |
31 | 31 | StringConst::EdmModel_Validator_Semantic_ElementDirectValueAnnotationFullNameMustBeUnique($annotation->getNamespaceUri(), $annotation->getName())); |
32 | - }else{ |
|
32 | + } else { |
|
33 | 33 | $annotationNameSet[] = $annotation->getNamespaceUri() . ':' . $annotation->getName(); |
34 | 34 | } |
35 | 35 | } |
@@ -11,6 +11,6 @@ |
||
11 | 11 | { |
12 | 12 | public function getValidatedType(): string |
13 | 13 | { |
14 | - return IPrimitiveValue::class ; |
|
14 | + return IPrimitiveValue::class; |
|
15 | 15 | } |
16 | 16 | } |
17 | 17 | \ No newline at end of file |