@@ -21,8 +21,7 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $complexType) |
22 | 22 | { |
23 | 23 | assert($complexType instanceof IComplexType); |
24 | - if ($complexType->isAbstract()) |
|
25 | - { |
|
24 | + if ($complexType->isAbstract()) { |
|
26 | 25 | $context->AddError( |
27 | 26 | $complexType->Location(), |
28 | 27 | EdmErrorCode::InvalidAbstractComplexType(), |
@@ -23,12 +23,10 @@ |
||
23 | 23 | if ( |
24 | 24 | $expression->getDeclaredType() != null && |
25 | 25 | !$context->checkIsBad($expression) && |
26 | - !$context->checkIsBad($expression->getDeclaredType())) |
|
27 | - { |
|
26 | + !$context->checkIsBad($expression->getDeclaredType())) { |
|
28 | 27 | $discoveredErrors = null; |
29 | 28 | ExpressionTypeChecker::TryAssertRecordAsType($expression, $expression->getDeclaredType(), null, false, $discoveredErrors); |
30 | - foreach ($discoveredErrors as $error) |
|
31 | - { |
|
29 | + foreach ($discoveredErrors as $error) { |
|
32 | 30 | $context->AddRawError($error); |
33 | 31 | } |
34 | 32 | } |
@@ -21,8 +21,7 @@ discard block |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $set) |
22 | 22 | { |
23 | 23 | assert($set instanceof IEntitySet); |
24 | - foreach ($set->getNavigationTargets() as $mapping) |
|
25 | - { |
|
24 | + foreach ($set->getNavigationTargets() as $mapping) { |
|
26 | 25 | if ( |
27 | 26 | !( |
28 | 27 | $mapping->getTargetEntitySet()->getElementType()->IsOrInheritsFrom( |
@@ -31,8 +30,7 @@ discard block |
||
31 | 30 | $mapping->getNavigationProperty()->ToEntityType()->IsOrInheritsFrom( |
32 | 31 | $mapping->getTargetEntitySet()->getElementType()) |
33 | 32 | ) && |
34 | - !$context->checkIsBad($mapping->getTargetEntitySet())) |
|
35 | - { |
|
33 | + !$context->checkIsBad($mapping->getTargetEntitySet())) { |
|
36 | 34 | $context->AddError( |
37 | 35 | $set->Location(), |
38 | 36 | EdmErrorCode::EntitySetNavigationPropertyMappingMustPointToValidTargetForProperty(), |
@@ -22,13 +22,11 @@ |
||
22 | 22 | public function __invoke(ValidationContext $context, ?IEdmElement $set) |
23 | 23 | { |
24 | 24 | assert($set instanceof IEntitySet); |
25 | - foreach ($set->getNavigationTargets() as $mapping) |
|
26 | - { |
|
25 | + foreach ($set->getNavigationTargets() as $mapping) { |
|
27 | 26 | if ( |
28 | 27 | $mapping->getNavigationProperty()->containsTarget() && |
29 | 28 | $mapping->getNavigationProperty()->getDeclaringType()->IsOrInheritsFrom($mapping->getNavigationProperty()->ToEntityType()) && |
30 | - $mapping->getTargetEntitySet() !== $set) |
|
31 | - { |
|
29 | + $mapping->getTargetEntitySet() !== $set) { |
|
32 | 30 | $context->AddError( |
33 | 31 | $set->Location(), |
34 | 32 | EdmErrorCode::EntitySetRecursiveNavigationPropertyMappingsMustPointBackToSourceEntitySet(), |
@@ -19,10 +19,8 @@ |
||
19 | 19 | public function __invoke(ValidationContext $context, ?IEdmElement $set) |
20 | 20 | { |
21 | 21 | assert($set instanceof IEntitySet); |
22 | - foreach ($set->getNavigationTargets() as $mapping) |
|
23 | - { |
|
24 | - if ($mapping->getNavigationProperty()->GetPrimary() === $mapping->getNavigationProperty()) |
|
25 | - { |
|
22 | + foreach ($set->getNavigationTargets() as $mapping) { |
|
23 | + if ($mapping->getNavigationProperty()->GetPrimary() === $mapping->getNavigationProperty()) { |
|
26 | 24 | Helpers::CheckForNameError( |
27 | 25 | $context, |
28 | 26 | $context->getModel()->GetAssociationSetName( |
@@ -19,8 +19,7 @@ |
||
19 | 19 | public function __invoke(ValidationContext $context, ?IEdmElement $entitySet) |
20 | 20 | { |
21 | 21 | assert($entitySet instanceof IEntitySet); |
22 | - if (!$context->checkIsBad($entitySet->getElementType())) |
|
23 | - { |
|
22 | + if (!$context->checkIsBad($entitySet->getElementType())) { |
|
24 | 23 | Helpers::CheckForUnreachableTypeError($context, $entitySet->getElementType(), $entitySet->Location()); |
25 | 24 | } |
26 | 25 | } |
@@ -22,8 +22,7 @@ discard block |
||
22 | 22 | public function __invoke(ValidationContext $context, ?IEdmElement $set) |
23 | 23 | { |
24 | 24 | assert($set instanceof IEntitySet); |
25 | - foreach ($set->getNavigationTargets() as $mapping) |
|
26 | - { |
|
25 | + foreach ($set->getNavigationTargets() as $mapping) { |
|
27 | 26 | $property = $mapping->getNavigationProperty(); |
28 | 27 | |
29 | 28 | $opposingTarget = $mapping->getTargetEntitySet()->findNavigationTarget($property->getPartner()); |
@@ -34,8 +33,7 @@ discard block |
||
34 | 33 | $opposingTarget != null || |
35 | 34 | $property->getPartner()->DeclaringEntityType()->findProperty($property->getPartner()->getName()) === $property->getPartner() |
36 | 35 | ) && |
37 | - $opposingTarget !== $set) |
|
38 | - { |
|
36 | + $opposingTarget !== $set) { |
|
39 | 37 | $context->AddError( |
40 | 38 | $set->Location(), |
41 | 39 | EdmErrorCode::EntitySetNavigationMappingMustBeBidirectional(), |
@@ -21,16 +21,12 @@ |
||
21 | 21 | { |
22 | 22 | assert($set instanceof IEntitySet); |
23 | 23 | $containmentFound = false; |
24 | - foreach ($set->getContainer()->EntitySets() as $otherSet) |
|
25 | - { |
|
26 | - foreach ( $otherSet->getNavigationTargets() as $mapping) |
|
27 | - { |
|
24 | + foreach ($set->getContainer()->EntitySets() as $otherSet) { |
|
25 | + foreach ( $otherSet->getNavigationTargets() as $mapping) { |
|
28 | 26 | $property = $mapping->getNavigationProperty(); |
29 | 27 | |
30 | - if ($mapping->getTargetEntitySet() === $set && $property->containsTarget()) |
|
31 | - { |
|
32 | - if ($containmentFound) |
|
33 | - { |
|
28 | + if ($mapping->getTargetEntitySet() === $set && $property->containsTarget()) { |
|
29 | + if ($containmentFound) { |
|
34 | 30 | $context->AddError( |
35 | 31 | $set->Location(), |
36 | 32 | EdmErrorCode::EntitySetCanOnlyBeContainedByASingleNavigationProperty(), |
@@ -26,8 +26,7 @@ |
||
26 | 26 | $entitySet->getElementType()->Key() === null || |
27 | 27 | count($entitySet->getElementType()->Key()) !== 0 |
28 | 28 | ) && |
29 | - !$context->checkIsBad($entitySet->getElementType())) |
|
30 | - { |
|
29 | + !$context->checkIsBad($entitySet->getElementType())) { |
|
31 | 30 | |
32 | 31 | $context->AddError( |
33 | 32 | $entitySet->Location(), |