Passed
Pull Request — master (#156)
by Alex
02:44
created
src/Csdl/Internal/Serialization/EdmModelCsdlSerializationVisitor.php 1 patch
Spacing   +8 added lines, -9 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
 
@@ -1207,10 +1206,10 @@  discard block
 block discarded – undo
1207 1206
             return false;
1208 1207
         }
1209 1208
 
1210
-        $thisAssociationAnnotations =[];
1209
+        $thisAssociationAnnotations = [];
1211 1210
         $thisEnd1Annotations        = [];
1212
-        $thisEnd2Annotations        =[];
1213
-        $thisConstraintAnnotations  =[];
1211
+        $thisEnd2Annotations        = [];
1212
+        $thisConstraintAnnotations  = [];
1214 1213
         $this->model->GetAssociationAnnotations(
1215 1214
             $thisPrimary,
1216 1215
             $thisAssociationAnnotations,
@@ -1222,7 +1221,7 @@  discard block
 block discarded – undo
1222 1221
         $thatAssociationAnnotations = [];
1223 1222
         $thatEnd1Annotations        = [];
1224 1223
         $thatEnd2Annotations        = [];
1225
-        $thatConstraintAnnotations  =[];
1224
+        $thatConstraintAnnotations  = [];
1226 1225
         $this->model->GetAssociationAnnotations(
1227 1226
             $thatPrimary,
1228 1227
             $thatAssociationAnnotations,
@@ -1336,8 +1335,8 @@  discard block
 block discarded – undo
1336 1335
         );
1337 1336
 
1338 1337
         $thatAssociationSetAnnotations = [];
1339
-        $thatEnd1Annotations           =[];
1340
-        $thatEnd2Annotations           =[];
1338
+        $thatEnd1Annotations           = [];
1339
+        $thatEnd2Annotations           = [];
1341 1340
         $this->model->GetAssociationSetAnnotations(
1342 1341
             $thatEntitySet,
1343 1342
             $thatNavprop,
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
@@ -1346,14 +1346,12 @@  discard block
 block discarded – undo
1346 1346
     {
1347 1347
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1348 1348
         assert(
1349
-            count((is_array($toXml) ? new ReflectionMethod(...$toXml) :
1350
-                new ReflectionFunction($toXml))->getParameters()) === 1,
1349
+            count((is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getParameters()) === 1,
1351 1350
             '$toXml should be a callable takeing one paramater of mixed type'
1352 1351
         );
1353 1352
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1354 1353
         assert(
1355
-            (is_array($toXml) ? new ReflectionMethod(...$toXml) :
1356
-                new ReflectionFunction($toXml))->getReturnType()->getName() === 'string',
1354
+            (is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getReturnType()->getName() === 'string',
1357 1355
             '$toXml should be a callable returning a string'
1358 1356
         );
1359 1357
         if ($value !== $defaultValue) {
@@ -1371,14 +1369,12 @@  discard block
 block discarded – undo
1371 1369
     {
1372 1370
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1373 1371
         assert(
1374
-            count((is_array($toXml) ? new ReflectionMethod(...$toXml) :
1375
-                new ReflectionFunction($toXml))->getParameters()) === 1,
1372
+            count((is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getParameters()) === 1,
1376 1373
             '$toXml should be a callable takeing one paramater of mixed type'
1377 1374
         );
1378 1375
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/
1379 1376
         assert(
1380
-            (is_array($toXml) ? new ReflectionMethod(...$toXml) :
1381
-                new ReflectionFunction($toXml))->getReturnType()->getName() === 'string',
1377
+            (is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getReturnType()->getName() === 'string',
1382 1378
             '$toXml should be a callable returning a string'
1383 1379
         );
1384 1380
         $this->xmlWriter->writeAttribute($attribute, $toXml($value));
@@ -1472,7 +1468,7 @@  discard block
 block discarded – undo
1472 1468
 
1473 1469
     private static function SridAsXml(?int $i): string
1474 1470
     {
1475
-        return $i !== null ? strval($i) :  CsdlConstants::Value_SridVariable;
1471
+        return $i !== null ? strval($i) : CsdlConstants::Value_SridVariable;
1476 1472
     }
1477 1473
 
1478 1474
     /**
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()) . '(' . ($element->getEntityType() !== null ?
@@ -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/VocabularyAnnotationHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             $annotation,
46 46
             EdmConstants::InternalUri,
47 47
             CsdlConstants::AnnotationSerializationLocationAnnotation,
48
-            (object)$location
48
+            (object) $location
49 49
         );
50 50
     }
51 51
 
Please login to merge, or discard this patch.
src/Helpers/EdmElementComparer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         $thisTypeKeys  = array_keys($thisFunction->getParameters());
146 146
         $otherTypeKeys = array_keys($otherFunction->getParameters());
147
-        $keyCount      =  count($thisTypeKeys);
147
+        $keyCount      = count($thisTypeKeys);
148 148
         for ($i = 0; $i < $keyCount; ++$i) {
149 149
             if (!self::isEquivalentTo(
150 150
                 $thisFunction->getParameters()[$thisTypeKeys[$i]],
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
         $thisTypeKeys  = array_keys($thisType->getDeclaredProperties());
209 209
         $otherTypeKeys = array_keys($otherType->getDeclaredProperties());
210
-        $keyCount      =  count($thisTypeKeys);
210
+        $keyCount      = count($thisTypeKeys);
211 211
         for ($i = 0; $i < $keyCount; ++$i) {
212 212
             if (!self::isEquivalentTo(
213 213
                 $thisType->getDeclaredProperties()[$thisTypeKeys[$i]],
Please login to merge, or discard this patch.
src/ModelVisitorConcerns/VisitElements.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         /** @var EdmModelVisitor $this */
36 36
         switch ($element->getSchemaElementKind()) {
37
-            case SchemaElementKind::Function():
37
+            case SchemaElementKind::Function ():
38 38
                 assert($element instanceof IFunction);
39 39
                 $this->processFunction($element);
40 40
                 break;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         /** @var EdmModelVisitor $this */
36 36
         switch ($element->getSchemaElementKind()) {
37
-            case SchemaElementKind::Function():
37
+            case SchemaElementKind::function():
38 38
                 assert($element instanceof IFunction);
39 39
                 $this->processFunction($element);
40 40
                 break;
Please login to merge, or discard this patch.
src/ModelVisitorConcerns/VisitAnnotations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function visitAnnotations(iterable $annotations): void
29 29
     {
30 30
         /** @var EdmModelVisitor $this */
31
-        self::visitCollection($annotations, [$this,'visitAnnotation']);
31
+        self::visitCollection($annotations, [$this, 'visitAnnotation']);
32 32
     }
33 33
 
34 34
     /**
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
@@ -51,14 +51,12 @@
 block discarded – undo
51 51
         );
52 52
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts. */
53 53
         assert(
54
-            (is_array($isBad) ? new ReflectionMethod(...$isBad) :
55
-                new ReflectionFunction($isBad))->getParameters()[0]->getType()->getName() === IEdmElement::class,
54
+            (is_array($isBad) ? new ReflectionMethod(...$isBad) : new ReflectionFunction($isBad))->getParameters()[0]->getType()->getName() === IEdmElement::class,
56 55
             '$isBad should be a callable taking one parameter of Type IEdmElement'
57 56
         );
58 57
         /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts. */
59 58
         assert(
60
-            (is_array($isBad) ? new ReflectionMethod(...$isBad) :
61
-                new ReflectionFunction($isBad))->getReturnType()->getName() === 'bool',
59
+            (is_array($isBad) ? new ReflectionMethod(...$isBad) : new ReflectionFunction($isBad))->getReturnType()->getName() === 'bool',
62 60
             '$isBad should be a callable returning a boolean'
63 61
         );
64 62
         $this->model = $model;
Please login to merge, or discard this patch.
Edm/Validation/Internal/InterfaceValidator/VisitorOfIEnumTypeReference.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 IEnumTypeReference);
16 16
         return null !== $typeRef->getDefinition() && !$typeRef->getDefinition()->getTypeKind()->isEnum()
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.