Passed
Pull Request — master (#156)
by Alex
03:41
created
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfISchemaElement.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
     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.
Upper-Lower-Casing   +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/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/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.
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/VisitorOfIValue.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $this->lookup[ValueKind::Floating()->getValue()]       = IFloatingValue::class;
40 40
         $this->lookup[ValueKind::Guid()->getValue()]           = IGuidValue::class;
41 41
         $this->lookup[ValueKind::Integer()->getValue()]        = IIntegerValue::class;
42
-        $this->lookup[ValueKind::Null()->getValue()]           = INullValue::class;
42
+        $this->lookup[ValueKind::null()->getValue()]           = INullValue::class;
43 43
         $this->lookup[ValueKind::String()->getValue()]         = IStringValue::class;
44 44
         $this->lookup[ValueKind::Structured()->getValue()]     = IStructuredValue::class;
45 45
         $this->lookup[ValueKind::Time()->getValue()]           = ITimeValue::class;
Please login to merge, or discard this patch.
Edm/Validation/Internal/InterfaceValidator/VisitorOfIRowTypeReference.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 IRowTypeReference);
17 17
         return null !== $typeRef->getDefinition() &&
18 18
                $typeRef->getDefinition()->getTypeKind() != TypeKind::Row()
19
-            ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null;
19
+            ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
20 20
     }
21 21
 
22 22
     public function forType(): string
Please login to merge, or discard this patch.
IFunctionImport/FunctionImportUnsupportedReturnTypeAfterV1.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
         assert($functionImport instanceof IFunctionImport);
25 25
         if (null !== $functionImport->getReturnType()) {
26 26
             $elementType = $functionImport->getReturnType()->IsCollection() ?
27
-                $functionImport->getReturnType()->AsCollection()->ElementType() :
28
-                $functionImport->getReturnType();
27
+                $functionImport->getReturnType()->AsCollection()->ElementType() : $functionImport->getReturnType();
29 28
             if (!$elementType->IsPrimitive() &&
30 29
                 !$elementType->IsEntity() &&
31 30
                 !$elementType->IsComplex() &&
Please login to merge, or discard this patch.
IFunctionImport/FunctionImportEntityTypeDoesNotMatchEntitySet.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
         if (null !== $functionImport->getEntitySet() && null !== $returnType) {
33 33
             /** @var ITypeReference $elementType */
34 34
             $elementType = $returnType->IsCollection() ?
35
-                $returnType->AsCollection()->ElementType() :
36
-                $returnType;
35
+                $returnType->AsCollection()->ElementType() : $returnType;
37 36
             EdmUtil::checkArgumentNull($elementType->getDefinition(), 'elementType->getDefinition');
38 37
             if ($elementType->IsEntity()) {
39 38
                 $returnedEntityType = $elementType->AsEntity()->EntityDefinition();
Please login to merge, or discard this patch.
src/Csdl/Internal/Serialization/EdmModelCsdlSchemaWriter.php 1 patch
Spacing   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1351,8 +1351,7 @@  discard block
 block discarded – undo
1351 1351
      */
1352 1352
     public function WriteOptionalAttribute(string $attribute, $value, $defaultValue, callable $toXml): void
1353 1353
     {
1354
-        $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) :
1355
-            new ReflectionFunction($toXml);
1354
+        $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml);
1356 1355
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1357 1356
         assert(
1358 1357
             1 === count(($stem)->getParameters()),
@@ -1360,8 +1359,7 @@  discard block
 block discarded – undo
1360 1359
         );
1361 1360
         $stemType = $stem->getReturnType();
1362 1361
         $name     = $stemType instanceof ReflectionNamedType ?
1363
-            $stemType->getName() :
1364
-            strval($stemType);
1362
+            $stemType->getName() : strval($stemType);
1365 1363
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1366 1364
         assert(
1367 1365
             'string' === $name,
@@ -1380,8 +1378,7 @@  discard block
 block discarded – undo
1380 1378
      */
1381 1379
     public function WriteRequiredAttribute(string $attribute, $value, callable $toXml): void
1382 1380
     {
1383
-        $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) :
1384
-            new ReflectionFunction($toXml);
1381
+        $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml);
1385 1382
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1386 1383
         assert(
1387 1384
             1 === count($stem->getParameters()),
@@ -1389,8 +1386,7 @@  discard block
 block discarded – undo
1389 1386
         );
1390 1387
         $stemType = $stem->getReturnType();
1391 1388
         $name     = $stemType instanceof ReflectionNamedType ?
1392
-            $stemType->getName() :
1393
-            strval($stemType);
1389
+            $stemType->getName() : strval($stemType);
1394 1390
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1395 1391
         assert(
1396 1392
             'string' === $name,
@@ -1487,7 +1483,7 @@  discard block
 block discarded – undo
1487 1483
 
1488 1484
     private static function SridAsXml(?int $i): string
1489 1485
     {
1490
-        return $i !== null ? strval($i) :  CsdlConstants::Value_SridVariable;
1486
+        return $i !== null ? strval($i) : CsdlConstants::Value_SridVariable;
1491 1487
     }
1492 1488
 
1493 1489
     /**
Please login to merge, or discard this patch.