Passed
Pull Request — master (#40)
by Alex
03:15
created
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIDelayedValue.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 IDelayedValue);
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.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfITerm.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
         assert($term instanceof ITerm);
20 20
         $termKindError = null;
21 21
 
22
-        switch ($term->getTermKind())
23
-        {
22
+        switch ($term->getTermKind()) {
24 23
             case TermKind::Type():
25 24
                 InterfaceValidator::CollectErrors(
26 25
                     InterfaceValidator::CheckForInterfaceKindValueMismatchError(
Please login to merge, or discard this patch.
Validation/Internal/InterfaceValidator/VisitorOfIPropertyConstructor.php 1 patch
Braces   +3 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
         assert($expression instanceof IPropertyConstructor);
16 16
         $errors = null;
17 17
 
18
-        if ($expression->getName() == null)
19
-        {
18
+        if ($expression->getName() == null) {
20 19
             InterfaceValidator::CollectErrors(
21 20
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
22 21
                     $expression,
@@ -26,12 +25,9 @@  discard block
 block discarded – undo
26 25
             );
27 26
         }
28 27
 
29
-        if ($expression->getValue() != null)
30
-        {
28
+        if ($expression->getValue() != null) {
31 29
             $followup[] = $expression->getValue();
32
-        }
33
-        else
34
-        {
30
+        } else {
35 31
             InterfaceValidator::CollectErrors(
36 32
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
37 33
                     $expression,
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfITypeReference.php 1 patch
Braces   +4 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,23 +15,17 @@
 block discarded – undo
15 15
     {
16 16
         assert($type instanceof ITypeReference);
17 17
 
18
-        if ($type->getDefinition() != null)
19
-        {
18
+        if ($type->getDefinition() != null) {
20 19
             // Transient types, such as collections, rows and entity refs are considered to be owned by the type reference, so they go as followups.
21 20
             // Schema types are owned by their model, so they go as references.
22
-            if ($type->getDefinition() instanceof ISchemaType)
23
-                    {
21
+            if ($type->getDefinition() instanceof ISchemaType) {
24 22
                         $references[] = $type->getDefinition();
25
-                    }
26
-                    else
27
-                    {
23
+                    } else {
28 24
                         $followup[] = $type->getDefinition();
29 25
                     }
30 26
 
31 27
                     return null;
32
-                }
33
-        else
34
-        {
28
+                } else {
35 29
             return [ InterfaceValidator::CreatePropertyMustNotBeNullError($type, "Definition")];
36 30
         }
37 31
     }
Please login to merge, or discard this patch.
Edm/Validation/Internal/InterfaceValidator/VisitorOfIStructuralProperty.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         assert($property instanceof IStructuralProperty);
17 17
         if ($property->getConcurrencyMode()->getValue() < ConcurrencyMode::None()->getValue() ||
18
-            $property->getConcurrencyMode() > ConcurrencyMode::Fixed()->getValue())
19
-        {
18
+            $property->getConcurrencyMode() > ConcurrencyMode::Fixed()->getValue()) {
20 19
             return [
21 20
                 InterfaceValidator::CreateEnumPropertyOutOfRangeError(
22 21
                     $property,
@@ -24,9 +23,7 @@  discard block
 block discarded – undo
24 23
                     "ConcurrencyMode"
25 24
                 )
26 25
             ];
27
-        }
28
-        else
29
-        {
26
+        } else {
30 27
             return null;
31 28
         }
32 29
     }
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIPropertyReferenceExpression.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 IPropertyReferenceExpression);
16 16
         $errors = null;
17 17
 
18
-                if ($expression->getBase() != null)
19
-                {
18
+                if ($expression->getBase() != null) {
20 19
                     $followup[] = $expression->getBase();
21
-                }
22
-                else
23
-                {
20
+                } else {
24 21
                     InterfaceValidator::CollectErrors(
25 22
                         InterfaceValidator::CreatePropertyMustNotBeNullError(
26 23
                             $expression,
@@ -30,12 +27,9 @@  discard block
 block discarded – undo
30 27
                     );
31 28
                 }
32 29
 
33
-                if ($expression->getReferencedProperty() != null)
34
-                {
30
+                if ($expression->getReferencedProperty() != null) {
35 31
                     $references[] = $expression->getReferencedProperty();
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.
Validation/Internal/InterfaceValidator/VisitorOfIEntityContainerElement.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
         assert($item instanceof IEntityContainerElement);
19 19
         $termKindError = null;
20
-        switch ($item->getContainerElementKind())
21
-        {
20
+        switch ($item->getContainerElementKind()) {
22 21
             case ContainerElementKind::EntitySet():
23 22
                 $termKindError = InterfaceValidator::CheckForInterfaceKindValueMismatchError($item, $item->getContainerElementKind(), "ContainerElementKind", IEntitySet::class);
24 23
                 break;
Please login to merge, or discard this patch.
Validation/Internal/InterfaceValidator/VisitorOfIAssertTypeExpression.php 1 patch
Braces   +4 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,12 +16,9 @@  discard block
 block discarded – undo
16 16
         assert($expression instanceof IAssertTypeExpression);
17 17
         $errors = null;
18 18
 
19
-        if ($expression->getOperand() != null)
20
-        {
19
+        if ($expression->getOperand() != null) {
21 20
             $followup[] = $expression->getOperand();
22
-        }
23
-        else
24
-        {
21
+        } else {
25 22
             InterfaceValidator::CollectErrors(
26 23
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
27 24
                     $expression,
@@ -30,13 +27,10 @@  discard block
 block discarded – undo
30 27
                 $errors);
31 28
         }
32 29
 
33
-        if ($expression->getType() != null)
34
-        {
30
+        if ($expression->getType() != null) {
35 31
             // Assert owns its type reference, so it goes as a followup.
36 32
             $followup[] = $expression->getType();
37
-        }
38
-        else
39
-        {
33
+        } else {
40 34
             InterfaceValidator::CollectErrors(
41 35
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
42 36
                     $expression,
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIEntitySetReferenceExpression.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 IEntitySetReferenceExpression);
16
-        if ($expression->getReferencedEntitySet() != null)
17
-        {
16
+        if ($expression->getReferencedEntitySet() != null) {
18 17
             $references[] = $expression->getReferencedEntitySet();
19 18
             return null;
20
-        }
21
-        else
22
-        {
19
+        } else {
23 20
             return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedEntitySet") ];
24 21
         }
25 22
     }
Please login to merge, or discard this patch.