Passed
Pull Request — master (#40)
by Alex
03:15
created
StructuralPropertyInvalidPropertyTypeConcurrencyMode.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
Edm/Validation/Internal/InterfaceValidator/VisitorOfIValueAnnotation.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,13 +13,10 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfILabeledElementReferenceExpression.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,13 +13,10 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIEnumValue.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,13 +13,10 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Validation/Internal/InterfaceValidator/VisitorOfICollectionExpression.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfICollectionType.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,14 +13,11 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIParameterReferenceExpression.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,13 +13,10 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Edm/Validation/Internal/InterfaceValidator/VisitorOfIIsTypeExpression.php 1 patch
Braces   +4 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,12 +15,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfILabeledElement.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,13 +13,10 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.