Passed
Pull Request — master (#156)
by Alex
03:37
created
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfISchemaElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     public function __construct()
21 21
     {
22 22
         $this->lookup[SchemaElementKind::TypeDefinition()->getKey()]  = ISchemaType::class;
23
-        $this->lookup[SchemaElementKind::Function()->getKey()]        = IFunction::class;
23
+        $this->lookup[SchemaElementKind::Function ()->getKey()]        = IFunction::class;
24 24
         $this->lookup[SchemaElementKind::ValueTerm()->getKey()]       = IValueTerm::class;
25 25
         $this->lookup[SchemaElementKind::EntityContainer()->getKey()] = IEntityContainer::class;
26 26
     }
Please login to merge, or discard this patch.
src/Edm/Validation/ValidationContext.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,12 +56,10 @@
 block discarded – undo
56 56
         $stem           = is_array($isBad) ? new ReflectionMethod(...$isBad) : new ReflectionFunction($isBad);
57 57
         $stemReturnType = $stem->getReturnType();
58 58
         $stemName       = $stemReturnType instanceof ReflectionNamedType ?
59
-            $stemReturnType->getName() :
60
-            strval($stemReturnType);
59
+            $stemReturnType->getName() : strval($stemReturnType);
61 60
         $stemParmType = $stem->getParameters()[0]->getType();
62 61
         $stemParmName = $stemParmType instanceof ReflectionNamedType ?
63
-            $stemParmType->getName() :
64
-            strval($stemParmType);
62
+            $stemParmType->getName() : strval($stemParmType);
65 63
 
66 64
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts. */
67 65
         assert(
Please login to merge, or discard this patch.
src/Asserts.php 1 patch
Spacing   +7 added lines, -13 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             );
37 37
         };
38 38
         assert(
39
-            $expectedReflection->getNumberOfRequiredParameters() ===  $actualReflection->getNumberOfRequiredParameters(),
39
+            $expectedReflection->getNumberOfRequiredParameters() === $actualReflection->getNumberOfRequiredParameters(),
40 40
             $messageBuilder('Incorrect Parameter Count')
41 41
         );
42 42
         if ($expectedReflection->hasReturnType()) {
@@ -48,11 +48,9 @@  discard block
 block discarded – undo
48 48
             $expectedReturnType = $expectedReflection->getReturnType();
49 49
             $actualReturnType   = $actualReflection->getReturnType();
50 50
             $name               = $expectedReturnType instanceof ReflectionNamedType ?
51
-                $expectedReturnType->getName() :
52
-                strval($expectedReturnType);
51
+                $expectedReturnType->getName() : strval($expectedReturnType);
53 52
             $actName = $actualReturnType instanceof ReflectionNamedType ?
54
-                $actualReturnType->getName() :
55
-                strval($actualReturnType);
53
+                $actualReturnType->getName() : strval($actualReturnType);
56 54
 
57 55
             assert(
58 56
                 $name === $actName,
@@ -77,11 +75,9 @@  discard block
 block discarded – undo
77 75
                 $expectedParmType = $expectedParm->getType();
78 76
                 $actualParmType   = $actualParm->getType();
79 77
                 $name             = $expectedParmType instanceof ReflectionNamedType ?
80
-                    $expectedParmType->getName() :
81
-                    strval($expectedParmType);
78
+                    $expectedParmType->getName() : strval($expectedParmType);
82 79
                 $actName = $actualParmType instanceof ReflectionNamedType ?
83
-                    $actualParmType->getName() :
84
-                    strval($actualParmType);
80
+                    $actualParmType->getName() : strval($actualParmType);
85 81
 
86 82
                 //TODO: improve this to check that the actual type does not return a childType;
87 83
                 assert(
@@ -107,8 +103,7 @@  discard block
 block discarded – undo
107 103
             if ($parameter->hasType()) {
108 104
                 $parmType        = $parameter->getType();
109 105
                 $parmName        = $parmType instanceof ReflectionNamedType ?
110
-                                    $parmType->getName() :
111
-                                    strval($parmType);
106
+                                    $parmType->getName() : strval($parmType);
112 107
                 $parameterString .= $parmType->allowsNull() ? '?' : '';
113 108
                 $parameterString .= $parmName . ' ';
114 109
             }
@@ -127,8 +122,7 @@  discard block
 block discarded – undo
127 122
         if ($reflection->hasReturnType()) {
128 123
             $returnType = $reflection->getReturnType();
129 124
             $name       = $returnType instanceof ReflectionNamedType ?
130
-                $returnType->getName() :
131
-                strval($returnType);
125
+                $returnType->getName() : strval($returnType);
132 126
             $return .= ': ' . $name;
133 127
         }
134 128
         return sprintf('function(%s)%s', implode(',', $parameters), $return);
Please login to merge, or discard this patch.
src/Internal/RegistrationHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     ) {
49 49
         $qualifiedName = $element->fullName();
50 50
         switch ($element->getSchemaElementKind()) {
51
-            case SchemaElementKind::Function():
51
+            case SchemaElementKind::Function ():
52 52
                 assert($element instanceof IFunction);
53 53
                 self::addFunction($element, $qualifiedName, $functionGroupDictionary);
54 54
                 break;
Please login to merge, or discard this patch.
src/Helpers/ToTraceString.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             case $element instanceof IProperty:
54 54
                 assert($element instanceof IProperty);
55 55
                 $type = $element->getType();
56
-                return $element->getName() ?? '' . ':' . ($type !== null ? self::toTraceString($type) :'');
56
+                return $element->getName() ?? '' . ':' . ($type !== null ? self::toTraceString($type) : '');
57 57
             case $element instanceof IEntityReferenceType:
58 58
                 assert($element instanceof IEntityReferenceType);
59 59
                 return strval(TypeKind::EntityReference()->getKey()) . '(' . (null !== $element->getEntityType() ?
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             $sb,
189 189
             EdmConstants::FacetName_Srid,
190 190
             null !== $type->getSpatialReferenceIdentifier()
191
-                ? $type->getSpatialReferenceIdentifier(): EdmConstants::Value_SridVariable
191
+                ? $type->getSpatialReferenceIdentifier() : EdmConstants::Value_SridVariable
192 192
         );
193 193
         return $sb;
194 194
     }
Please login to merge, or discard this patch.
src/Helpers/PrimitiveTypeReferenceHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
36 36
     public function primitiveKind(): PrimitiveTypeKind
37 37
     {
38 38
         $primitive = $this->primitiveDefinition();
39
-        return $primitive !== null ? $primitive->getPrimitiveKind(): PrimitiveTypeKind::None();
39
+        return $primitive !== null ? $primitive->getPrimitiveKind() : PrimitiveTypeKind::None();
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIParameterReferenceExpression.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
             $references[] = $expression->getReferencedParameter();
18 18
             return null;
19 19
         } else {
20
-            return [ InterfaceValidator::createPropertyMustNotBeNullError($expression, 'ReferencedParameter') ];
20
+            return [InterfaceValidator::createPropertyMustNotBeNullError($expression, 'ReferencedParameter')];
21 21
         }
22 22
     }
23 23
 
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfICollectionTypeReference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         assert($typeRef instanceof ICollectionTypeReference);
16 16
         return null !== $typeRef->getDefinition() &&
17 17
                !$typeRef->getDefinition()->getTypeKind()->isCollection() ?
18
-            [ InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)]: null;
18
+            [InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
19 19
     }
20 20
 
21 21
     public function forType(): string
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIBinaryValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         assert($value instanceof IBinaryValue);
16 16
         return null === $value->getValue() ?
17
-            [InterfaceValidator::createPropertyMustNotBeNullError($value, 'Value') ]
17
+            [InterfaceValidator::createPropertyMustNotBeNullError($value, 'Value')]
18 18
             :
19 19
             null;
20 20
     }
Please login to merge, or discard this patch.