@@ -24,8 +24,7 @@ |
||
24 | 24 | assert($property instanceof IStructuralProperty); |
25 | 25 | if ($property->getConcurrencyMode()->isFixed() && |
26 | 26 | !$property->getType()->IsPrimitive() && |
27 | - !$context->checkIsBad($property->getType()->getDefinition())) |
|
28 | - { |
|
27 | + !$context->checkIsBad($property->getType()->getDefinition())) { |
|
29 | 28 | $context->AddError( |
30 | 29 | $property->Location(), |
31 | 30 | EdmErrorCode::InvalidPropertyType(), |
@@ -13,13 +13,10 @@ |
||
13 | 13 | protected function VisitT($annotation, array &$followup, array &$references): iterable |
14 | 14 | { |
15 | 15 | assert($annotation instanceof IValueAnnotation); |
16 | - if ($annotation->getValue() != null) |
|
17 | - { |
|
16 | + if ($annotation->getValue() != null) { |
|
18 | 17 | $followup[] = $annotation->getValue(); |
19 | 18 | return null; |
20 | - } |
|
21 | - else |
|
22 | - { |
|
19 | + } else { |
|
23 | 20 | return [InterfaceValidator::CreatePropertyMustNotBeNullError($annotation, "Value") ]; |
24 | 21 | } |
25 | 22 | } |
@@ -13,13 +13,10 @@ |
||
13 | 13 | protected function VisitT($expression, array &$followup, array &$references): iterable |
14 | 14 | { |
15 | 15 | assert($expression instanceof ILabeledExpressionReferenceExpression); |
16 | - if ($expression->getReferencedLabeledExpression() != null) |
|
17 | - { |
|
16 | + if ($expression->getReferencedLabeledExpression() != null) { |
|
18 | 17 | $references[] = $expression->getReferencedLabeledExpression(); |
19 | 18 | return null; |
20 | - } |
|
21 | - else |
|
22 | - { |
|
19 | + } else { |
|
23 | 20 | return [ |
24 | 21 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
25 | 22 | $expression, |
@@ -13,13 +13,10 @@ |
||
13 | 13 | protected function VisitT($value, array &$followup, array &$references): iterable |
14 | 14 | { |
15 | 15 | assert($value instanceof IEnumValue); |
16 | - if ($value->getValue() != null) |
|
17 | - { |
|
16 | + if ($value->getValue() != null) { |
|
18 | 17 | $followup[] = $value->getValue(); |
19 | 18 | return null; |
20 | - } |
|
21 | - else |
|
22 | - { |
|
19 | + } else { |
|
23 | 20 | return [InterfaceValidator::CreatePropertyMustNotBeNullError($value, "Value")]; |
24 | 21 | } |
25 | 22 | } |
@@ -17,8 +17,7 @@ |
||
17 | 17 | |
18 | 18 | InterfaceValidator::ProcessEnumerable($expression, $expression->getElements(), "Elements", $followup, $errors); |
19 | 19 | |
20 | - if ($expression->getDeclaredType() != null) |
|
21 | - { |
|
20 | + if ($expression->getDeclaredType() != null) { |
|
22 | 21 | // Collection constructor owns its type reference, so it goes as a followup. |
23 | 22 | $followup[] = $expression->getDeclaredType(); |
24 | 23 | } |
@@ -13,14 +13,11 @@ |
||
13 | 13 | protected function VisitT($type, array &$followup, array &$references): iterable |
14 | 14 | { |
15 | 15 | assert($type instanceof ICollectionType); |
16 | - if ($type->getElementType() != null) |
|
17 | - { |
|
16 | + if ($type->getElementType() != null) { |
|
18 | 17 | // Collection owns its element type reference, so it goes as a followup. |
19 | 18 | $followup[] = $type->getElementType(); |
20 | 19 | return null; |
21 | - } |
|
22 | - else |
|
23 | - { |
|
20 | + } else { |
|
24 | 21 | return[ InterfaceValidator::CreatePropertyMustNotBeNullError($type, "ElementType")]; |
25 | 22 | } |
26 | 23 |
@@ -13,13 +13,10 @@ |
||
13 | 13 | protected function VisitT($expression, array &$followup, array &$references): iterable |
14 | 14 | { |
15 | 15 | assert($expression instanceof IParameterReferenceExpression); |
16 | - if ($expression->getReferencedParameter() != null) |
|
17 | - { |
|
16 | + if ($expression->getReferencedParameter() != null) { |
|
18 | 17 | $references[] = $expression->getReferencedParameter(); |
19 | 18 | return null; |
20 | - } |
|
21 | - else |
|
22 | - { |
|
19 | + } else { |
|
23 | 20 | return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedParameter") ]; |
24 | 21 | } |
25 | 22 | } |
@@ -15,12 +15,9 @@ discard block |
||
15 | 15 | assert($expression instanceof IIsTypeExpression); |
16 | 16 | $errors = null; |
17 | 17 | |
18 | - if ($expression->getOperand() != null) |
|
19 | - { |
|
18 | + if ($expression->getOperand() != null) { |
|
20 | 19 | $followup[] = $expression->getOperand(); |
21 | - } |
|
22 | - else |
|
23 | - { |
|
20 | + } else { |
|
24 | 21 | InterfaceValidator::CollectErrors( |
25 | 22 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
26 | 23 | $expression, |
@@ -29,13 +26,10 @@ discard block |
||
29 | 26 | ); |
30 | 27 | } |
31 | 28 | |
32 | - if ($expression->getType() != null) |
|
33 | - { |
|
29 | + if ($expression->getType() != null) { |
|
34 | 30 | // Assert owns its type reference, so it goes as a followup. |
35 | 31 | $followup[] = $expression->getType(); |
36 | - } |
|
37 | - else |
|
38 | - { |
|
32 | + } else { |
|
39 | 33 | InterfaceValidator::CollectErrors( |
40 | 34 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
41 | 35 | $expression, |
@@ -13,13 +13,10 @@ |
||
13 | 13 | protected function VisitT($expression, array &$followup, array &$references): iterable |
14 | 14 | { |
15 | 15 | assert($expression instanceof ILabeledExpression); |
16 | - if ($expression->getExpressionKind() != null) |
|
17 | - { |
|
16 | + if ($expression->getExpressionKind() != null) { |
|
18 | 17 | $followup[] = $expression->getExpressionKind(); |
19 | 18 | return null; |
20 | - } |
|
21 | - else |
|
22 | - { |
|
19 | + } else { |
|
23 | 20 | return [InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "Expression") ]; |
24 | 21 | } |
25 | 22 | } |