@@ -15,12 +15,9 @@ discard block |
||
15 | 15 | assert($expression instanceof IIfExpression); |
16 | 16 | $errors = null; |
17 | 17 | |
18 | - if ($expression->getTestExpression() != null) |
|
19 | - { |
|
18 | + if ($expression->getTestExpression() != null) { |
|
20 | 19 | $followup[] = $expression->getTestExpression(); |
21 | - } |
|
22 | - else |
|
23 | - { |
|
20 | + } else { |
|
24 | 21 | InterfaceValidator::CollectErrors( |
25 | 22 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
26 | 23 | $expression, |
@@ -30,12 +27,9 @@ discard block |
||
30 | 27 | ); |
31 | 28 | } |
32 | 29 | |
33 | - if ($expression->getTrueExpression() != null) |
|
34 | - { |
|
30 | + if ($expression->getTrueExpression() != null) { |
|
35 | 31 | $followup[] = $expression->getTrueExpression(); |
36 | - } |
|
37 | - else |
|
38 | - { |
|
32 | + } else { |
|
39 | 33 | InterfaceValidator::CollectErrors( |
40 | 34 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
41 | 35 | $expression, |
@@ -45,12 +39,9 @@ discard block |
||
45 | 39 | ); |
46 | 40 | } |
47 | 41 | |
48 | - if ($expression->getFalseExpression() != null) |
|
49 | - { |
|
42 | + if ($expression->getFalseExpression() != null) { |
|
50 | 43 | $followup[] = $expression->getFalseExpression(); |
51 | - } |
|
52 | - else |
|
53 | - { |
|
44 | + } else { |
|
54 | 45 | InterfaceValidator::CollectErrors( |
55 | 46 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
56 | 47 | $expression, "FalseExpression" |
@@ -42,10 +42,8 @@ |
||
42 | 42 | assert($expression instanceof IExpression); |
43 | 43 | // Trying to reduce amount of noise in errors - if this expression is bad, then most likely it will have an unacceptable kind, no need to report it. |
44 | 44 | $expressionKindError = null; |
45 | - if (!InterfaceValidator::IsCheckableBad($expression)) |
|
46 | - { |
|
47 | - switch ($expression->getExpressionKind()) |
|
48 | - { |
|
45 | + if (!InterfaceValidator::IsCheckableBad($expression)) { |
|
46 | + switch ($expression->getExpressionKind()) { |
|
49 | 47 | case ExpressionKind::IntegerConstant(): |
50 | 48 | $expressionKindError = InterfaceValidator::CheckForInterfaceKindValueMismatchError($expression, $expression->getExpressionKind(), "ExpressionKind", IIntegerConstantExpression::class); |
51 | 49 | break; |
@@ -12,8 +12,7 @@ |
||
12 | 12 | protected function VisitT($functionImport, array &$followup, array &$references): iterable |
13 | 13 | { |
14 | 14 | assert($functionImport instanceof IFunctionImport); |
15 | - if ($functionImport->getEntitySet() != null) |
|
16 | - { |
|
15 | + if ($functionImport->getEntitySet() != null) { |
|
17 | 16 | $followup[] = $functionImport->getEntitySet(); |
18 | 17 | } |
19 | 18 |
@@ -15,12 +15,9 @@ discard block |
||
15 | 15 | assert($binding instanceof IPropertyValueBinding); |
16 | 16 | $errors = null; |
17 | 17 | |
18 | - if ($binding->getValue() != null) |
|
19 | - { |
|
18 | + if ($binding->getValue() != null) { |
|
20 | 19 | $followup[] = $binding->getValue(); |
21 | - } |
|
22 | - else |
|
23 | - { |
|
20 | + } else { |
|
24 | 21 | InterfaceValidator::CollectErrors( |
25 | 22 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
26 | 23 | $binding, |
@@ -29,12 +26,9 @@ discard block |
||
29 | 26 | ); |
30 | 27 | } |
31 | 28 | |
32 | - if ($binding->getBoundProperty() != null) |
|
33 | - { |
|
29 | + if ($binding->getBoundProperty() != null) { |
|
34 | 30 | $references[] = $binding->getBoundProperty(); |
35 | - } |
|
36 | - else |
|
37 | - { |
|
31 | + } else { |
|
38 | 32 | InterfaceValidator::CollectErrors( |
39 | 33 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
40 | 34 | $binding, |
@@ -15,16 +15,13 @@ |
||
15 | 15 | protected function VisitT($expression, array &$followup, array &$references): iterable |
16 | 16 | { |
17 | 17 | assert($expression instanceof IFunctionReferenceExpression); |
18 | - if ($expression->getReferencedFunction() != null) |
|
19 | - { |
|
18 | + if ($expression->getReferencedFunction() != null) { |
|
20 | 19 | assert($expression->getReferencedFunction() instanceof ISchemaElement || |
21 | 20 | $expression instanceof IEntityContainerElement, |
22 | 21 | "Return as followup if the referenced object is not a schema function or a function import."); |
23 | 22 | $references[] = $expression->getReferencedFunction(); |
24 | 23 | return null; |
25 | - } |
|
26 | - else |
|
27 | - { |
|
24 | + } else { |
|
28 | 25 | return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedFunction") ]; |
29 | 26 | } |
30 | 27 | } |
@@ -29,14 +29,12 @@ |
||
29 | 29 | { |
30 | 30 | assert($value instanceof IValue); |
31 | 31 | $errors = null; |
32 | - if ($value->getType() != null) |
|
33 | - { |
|
32 | + if ($value->getType() != null) { |
|
34 | 33 | // Value owns its type reference, so it goes as a followup. |
35 | 34 | $followup[] = $value->getType(); |
36 | 35 | } |
37 | 36 | |
38 | - switch ($value->getValueKind()) |
|
39 | - { |
|
37 | + switch ($value->getValueKind()) { |
|
40 | 38 | case ValueKind::Binary(): |
41 | 39 | InterfaceValidator::CollectErrors( |
42 | 40 | InterfaceValidator::CheckForInterfaceKindValueMismatchError ( |
@@ -13,13 +13,10 @@ |
||
13 | 13 | protected function VisitT($expression, array &$followup, array &$references): iterable |
14 | 14 | { |
15 | 15 | assert($expression instanceof IEnumMemberReferenceExpression); |
16 | - if ($expression->getReferencedEnumMember() != null) |
|
17 | - { |
|
16 | + if ($expression->getReferencedEnumMember() != null) { |
|
18 | 17 | $references[] = $expression->getReferencedEnumMember(); |
19 | 18 | return null; |
20 | - } |
|
21 | - else |
|
22 | - { |
|
19 | + } else { |
|
23 | 20 | return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedEnumMember") ]; |
24 | 21 | } |
25 | 22 | } |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | assert($annotation instanceof IDirectValueAnnotation); |
16 | 16 | $errors = null; |
17 | 17 | |
18 | - if ($annotation->getNamespaceUri() == null) |
|
19 | - { |
|
18 | + if ($annotation->getNamespaceUri() == null) { |
|
20 | 19 | InterfaceValidator::CollectErrors( |
21 | 20 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
22 | 21 | $annotation, |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | ); |
27 | 26 | } |
28 | 27 | |
29 | - if ($annotation->getValue() == null) |
|
30 | - { |
|
28 | + if ($annotation->getValue() == null) { |
|
31 | 29 | InterfaceValidator::CollectErrors( |
32 | 30 | InterfaceValidator::CreatePropertyMustNotBeNullError( |
33 | 31 | $annotation, |
@@ -17,8 +17,7 @@ |
||
17 | 17 | |
18 | 18 | InterfaceValidator::ProcessEnumerable($expression, $expression->getProperties(), "Properties", $followup, $errors); |
19 | 19 | |
20 | - if ($expression->getDeclaredType() != null) |
|
21 | - { |
|
20 | + if ($expression->getDeclaredType() != null) { |
|
22 | 21 | // Record constructor owns its type reference, so it goes as a followup. |
23 | 22 | $followup[] = $expression->getDeclaredType(); |
24 | 23 | } |