Failed Conditions
Push — master ( 2b713c...735d0a )
by Alex
16s queued 13s
created
Validation/Internal/InterfaceValidator/VisitorOfIComplexTypeReference.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($typeRef instanceof IComplexTypeReference);
16 16
         return null !== $typeRef->getDefinition() && !$typeRef->getDefinition()->getTypeKind()->isComplex()
17
-            ? [ InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null;
17
+            ? [InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
18 18
     }
19 19
 
20 20
     public function forType(): string
Please login to merge, or discard this patch.
src/Edm/Internal/CacheHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
     }
21 21
     public static function getCycleSentinel(): ?stdClass
22 22
     {
23
-        return (object)[];
23
+        return (object) [];
24 24
     }
25 25
     public static function getSecondPassCycleSentinel(): ?stdClass
26 26
     {
27
-        return (object)[];
27
+        return (object) [];
28 28
     }
29 29
     public static function getBoxed(bool $value)
30 30
     {
Please login to merge, or discard this patch.
src/Helpers/VocabularyAnnotationHelpers.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         /** @var IVocabularyAnnotation $annotation */
20 20
         $annotation = $this;
21 21
         return $annotation->getSerializationLocation($model) ==
22
-               EdmVocabularyAnnotationSerializationLocation::Inline() || null === $annotation->targetString();
22
+                EdmVocabularyAnnotationSerializationLocation::Inline() || null === $annotation->targetString();
23 23
     }
24 24
 
25 25
     public function targetString(): string
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.
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/Csdl/EdmxWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
                 $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmxVersion(), StringConst::Serializer_UnknownEdmxVersion())];
95 95
                 return false;
96 96
             }
97
-        } elseif (! $edmxVersion = CsdlConstants::edmToEdmxVersions($model->getEdmVersion() ?? Version::v3())) {
98
-            $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion()) ];
97
+        } elseif (!$edmxVersion = CsdlConstants::edmToEdmxVersions($model->getEdmVersion() ?? Version::v3())) {
98
+            $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion())];
99 99
             return false;
100 100
         }
101 101
 
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.
src/Csdl/Internal/Serialization/EdmModelCsdlSerializationVisitor.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1298,7 +1298,7 @@  discard block
 block discarded – undo
1298 1298
 
1299 1299
         // Association Set
1300 1300
         if (!($this->model->getAssociationSetName($thisEntitySet, $thisNavprop) ==
1301
-              $this->model->getAssociationSetName($thatEntitySet, $thatNavprop) &&
1301
+                $this->model->getAssociationSetName($thatEntitySet, $thatNavprop) &&
1302 1302
               $this->model->getAssociationFullName($thisNavprop) == $this->model->getAssociationFullName($thatNavprop))) {
1303 1303
             return false;
1304 1304
         }
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
 
1321 1321
         if (null !== $thisOtherEntitySet) {
1322 1322
             if (!($this->model->getAssociationEndName($thisNavprop->getPartner()) ==
1323
-                  $this->model->getAssociationEndName($thatNavprop->getPartner()) &&
1323
+                    $this->model->getAssociationEndName($thatNavprop->getPartner()) &&
1324 1324
                   $thisOtherEntitySet->getName() == $thatOtherEntitySet->getName())) {
1325 1325
                 return false;
1326 1326
             }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -132,8 +132,7 @@  discard block
 block discarded – undo
132 132
         $alias = null;
133 133
         if ($this->namespaceAliasMappings != null) {
134 134
             $alias = array_key_exists($element->getNamespace(), $this->namespaceAliasMappings) ?
135
-                $this->namespaceAliasMappings[$element->getNamespace()] :
136
-                null;
135
+                $this->namespaceAliasMappings[$element->getNamespace()] : null;
137 136
         }
138 137
 
139 138
         $this->schemaWriter->writeSchemaElementHeader($element, $alias, $mappings);
@@ -609,7 +608,7 @@  discard block
 block discarded – undo
609 608
     protected function processPropertyReferenceExpression(IPropertyReferenceExpression $expression): void
610 609
     {
611 610
         $this->beginElement($expression, [$this->schemaWriter, 'writePropertyReferenceExpressionElementHeader']);
612
-        if ($expression->getBase()!= null) {
611
+        if ($expression->getBase() != null) {
613 612
             $this->visitExpression($expression->getBase());
614 613
         }
615 614
 
@@ -1208,10 +1207,10 @@  discard block
 block discarded – undo
1208 1207
             return false;
1209 1208
         }
1210 1209
 
1211
-        $thisAssociationAnnotations =[];
1210
+        $thisAssociationAnnotations = [];
1212 1211
         $thisEnd1Annotations        = [];
1213
-        $thisEnd2Annotations        =[];
1214
-        $thisConstraintAnnotations  =[];
1212
+        $thisEnd2Annotations        = [];
1213
+        $thisConstraintAnnotations  = [];
1215 1214
         $this->model->getAssociationAnnotations(
1216 1215
             $thisPrimary,
1217 1216
             $thisAssociationAnnotations,
@@ -1223,7 +1222,7 @@  discard block
 block discarded – undo
1223 1222
         $thatAssociationAnnotations = [];
1224 1223
         $thatEnd1Annotations        = [];
1225 1224
         $thatEnd2Annotations        = [];
1226
-        $thatConstraintAnnotations  =[];
1225
+        $thatConstraintAnnotations  = [];
1227 1226
         $this->model->getAssociationAnnotations(
1228 1227
             $thatPrimary,
1229 1228
             $thatAssociationAnnotations,
@@ -1268,7 +1267,7 @@  discard block
 block discarded – undo
1268 1267
         if (null === $theseProperties || null === $thoseProperties) {
1269 1268
             return false;
1270 1269
         }
1271
-        $numProp   = count($theseProperties);
1270
+        $numProp = count($theseProperties);
1272 1271
         if ($numProp != count($thoseProperties)) {
1273 1272
             return false;
1274 1273
         }
@@ -1339,8 +1338,8 @@  discard block
 block discarded – undo
1339 1338
         );
1340 1339
 
1341 1340
         $thatAssociationSetAnnotations = [];
1342
-        $thatEnd1Annotations           =[];
1343
-        $thatEnd2Annotations           =[];
1341
+        $thatEnd1Annotations           = [];
1342
+        $thatEnd2Annotations           = [];
1344 1343
         $this->model->getAssociationSetAnnotations(
1345 1344
             $thatEntitySet,
1346 1345
             $thatNavprop,
Please login to merge, or discard this patch.
src/Util/ExpressionTypeChecker.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 // If we don't have the applied function we just assume that it will work.
205 205
                 $discoveredErrors = [];
206 206
                 return true;
207
-            case ExpressionKind::If():
207
+            case ExpressionKind::If ():
208 208
                 assert($expression instanceof IIfExpression);
209 209
                 return self::tryAssertIfAsType($expression, $type, $context, $matchExactly, $discoveredErrors);
210 210
             case ExpressionKind::IsType():
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         iterable &$discoveredErrors
307 307
     ): bool {
308 308
         if (!$type->isPrimitive()) {
309
-            $discoveredErrors =  [
309
+            $discoveredErrors = [
310 310
                 new EdmError(
311 311
                     $expression->location(),
312 312
                     EdmErrorCode::PrimitiveConstantExpressionNotValidForNonPrimitiveType(),
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
                 return self::tryAssertIntegerConstantInRange(
771 771
                     $expression,
772 772
                     (int)-9223372036854775808,
773
-                    (int)999999999999,
773
+                    (int) 999999999999,
774 774
                     $discoveredErrors
775 775
                 );
776 776
             case PrimitiveTypeKind::Int32():
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
                     $discoveredErrors
803 803
                 );
804 804
             default:
805
-                $discoveredErrors =  [
805
+                $discoveredErrors = [
806 806
                     new EdmError(
807 807
                         $expression->location(),
808 808
                         EdmErrorCode::ExpressionPrimitiveKindNotValidForAssertedType(),
@@ -926,7 +926,7 @@  discard block
 block discarded – undo
926 926
 
927 927
             if ($expressionType->getTypeKind()->isPrimitive() && $assertedType->getTypeKind()->isPrimitive()) {
928 928
                 $primitiveExpressionType = $expressionType;
929
-                $primitiveAssertedType   = $assertedType ;
929
+                $primitiveAssertedType   = $assertedType;
930 930
                 assert($primitiveExpressionType instanceof IPrimitiveType);
931 931
                 assert($primitiveAssertedType instanceof IPrimitiveType);
932 932
                 if (!self::promotesTo(
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                     );
176 176
                 }
177 177
                 return self::tryAssertPrimitiveAsType($primitiveValue, $type, $discoveredErrors);
178
-            case ExpressionKind::Null():
178
+            case ExpressionKind::null():
179 179
                 assert($expression instanceof INullExpression);
180 180
                 return self::tryAssertNullAsType($expression, $type, $discoveredErrors);
181 181
             case ExpressionKind::Path():
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 // If we don't have the applied function we just assume that it will work.
205 205
                 $discoveredErrors = [];
206 206
                 return true;
207
-            case ExpressionKind::If():
207
+            case ExpressionKind::if():
208 208
                 assert($expression instanceof IIfExpression);
209 209
                 return self::tryAssertIfAsType($expression, $type, $context, $matchExactly, $discoveredErrors);
210 210
             case ExpressionKind::IsType():
Please login to merge, or discard this patch.