Passed
Pull Request — master (#40)
by Alex
03:15
created
IStructuralProperty/StructuralPropertyInvalidPropertyType.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
     public function __invoke(ValidationContext $context, ?IEdmElement $property)
22 22
     {
23 23
         assert($property instanceof IStructuralProperty);
24
-        if ($property->getDeclaringType()->getTypeKind()->isRow())
25
-        {
24
+        if ($property->getDeclaringType()->getTypeKind()->isRow()) {
26 25
             $validatedType = $property->getType()->IsCollection() ?
27 26
                 $property->getType()->AsCollection()->ElementType()->getDefinition()
28 27
                 :
@@ -31,8 +30,7 @@  discard block
 block discarded – undo
31 30
             if (!$validatedType->getTypeKind()->isPrimitive() &&
32 31
                 !$validatedType->getTypeKind()->isEnum() &&
33 32
                 !$validatedType->getTypeKind()->isComplex() &&
34
-                !$context->checkIsBad($validatedType))
35
-            {
33
+                !$context->checkIsBad($validatedType)) {
36 34
                 $context->AddError(
37 35
                     $property->Location(),
38 36
                     EdmErrorCode::InvalidPropertyType(),
Please login to merge, or discard this patch.
StructuralPropertyInvalidPropertyTypeConcurrencyMode.php 2 patches
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
                 StringConst::EdmModel_Validator_Semantic_InvalidPropertyTypeConcurrencyMode(
33 33
                     (
34 34
                     $property->getType()->IsCollection() ?
35
-                        EdmConstants::Type_Collection :
36
-                        $property->getType()->TypeKind()->getKey()
35
+                        EdmConstants::Type_Collection : $property->getType()->TypeKind()->getKey()
37 36
                     )
38 37
                 )
39 38
             );
Please login to merge, or discard this 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 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         }
21 21
         else
22 22
         {
23
-            return [InterfaceValidator::CreatePropertyMustNotBeNullError($annotation, "Value") ];
23
+            return [InterfaceValidator::CreatePropertyMustNotBeNullError($annotation, "Value")];
24 24
         }
25 25
     }
26 26
 
Please login to merge, or discard this 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.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfINamedElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     protected function VisitT($item, array &$followup, array &$references): iterable
14 14
     {
15 15
         assert($item instanceof INamedElement);
16
-        return $item->getName() != null ? null : [ InterfaceValidator::CreatePropertyMustNotBeNullError($item, "Name") ];
16
+        return $item->getName() != null ? null : [InterfaceValidator::CreatePropertyMustNotBeNullError($item, "Name")];
17 17
     }
18 18
 
19 19
     public function forType(): string
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.
Validation/Internal/InterfaceValidator/VisitorOfIBinaryTypeReference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         assert($typeRef instanceof IBinaryTypeReference);
17 17
         $primitive = $typeRef->getDefinition();
18 18
         assert($primitive instanceof IPrimitiveType);
19
-        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isBinary() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null;
19
+        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isBinary() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
20 20
     }
21 21
 
22 22
     public function forType(): string
Please login to merge, or discard this patch.
Validation/Internal/InterfaceValidator/VisitorOfIStringTypeReference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         assert($typeRef instanceof IStringTypeReference);
18 18
         $primitive = $typeRef->getDefinition();
19 19
         assert($primitive instanceof IPrimitiveType);
20
-        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isString() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null;
20
+        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isString() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
21 21
     }
22 22
 
23 23
     public function forType(): string
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.