Passed
Pull Request — master (#45)
by Christopher
04:31 queued 01:28
created
src/Asserts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             );
36 36
         };
37 37
         assert(
38
-            $expectedReflection->getNumberOfRequiredParameters() ===  $actualReflection->getNumberOfRequiredParameters(),
38
+            $expectedReflection->getNumberOfRequiredParameters() === $actualReflection->getNumberOfRequiredParameters(),
39 39
             $messageBuilder('Incorrect Parameter Count')
40 40
         );
41 41
         if ($expectedReflection->hasReturnType()) {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             $parameterString = '';
86 86
             if ($parameter->hasType()) {
87 87
                 $parameterString .= $parameter->getType()->allowsNull() ? '?' : '';
88
-                $parameterString .=$parameter->getType()->getName() . ' ';
88
+                $parameterString .= $parameter->getType()->getName() . ' ';
89 89
             }
90 90
             $parameterString .= $parameter->isVariadic() ? '...$' : '$';
91 91
             $parameterString .= $parameter->getName();
Please login to merge, or discard this patch.
src/Library/Internal/Ambiguous/AmbiguousFunctionBinding.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     public function getSchemaElementKind(): SchemaElementKind
50 50
     {
51
-        return SchemaElementKind::Function();
51
+        return SchemaElementKind::Function ();
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     public function getSchemaElementKind(): SchemaElementKind
50 50
     {
51
-        return SchemaElementKind::Function();
51
+        return SchemaElementKind::function();
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
src/Util/XmlCharType.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -334,7 +334,7 @@
 block discarded – undo
334 334
             $str1 = mb_substr($ranges, $p, 1, 'UTF-8');
335 335
             $str2 = mb_substr($ranges, $p+1, 1, 'UTF-8');
336 336
             for ($i = mb_ord($str1),
337
-                 $last = mb_ord($str2); $i <= $last; $i++) {
337
+                    $last = mb_ord($str2); $i <= $last; $i++) {
338 338
                 if (!isset(self::$s_CharProperties[$i])) {
339 339
                     self::$s_CharProperties[$i] = $value;
340 340
                 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -330,9 +330,9 @@
 block discarded – undo
330 330
     private static function SetProperties(string $ranges, int $value): void
331 331
     {
332 332
         assert(mb_strlen($ranges, 'UTF-8') % 2 === 0);
333
-        for ($p = 0; $p < mb_strlen($ranges, 'UTF-8'); $p +=2) {
333
+        for ($p = 0; $p < mb_strlen($ranges, 'UTF-8'); $p += 2) {
334 334
             $str1 = mb_substr($ranges, $p, 1, 'UTF-8');
335
-            $str2 = mb_substr($ranges, $p+1, 1, 'UTF-8');
335
+            $str2 = mb_substr($ranges, $p + 1, 1, 'UTF-8');
336 336
             for ($i = mb_ord($str1),
337 337
                  $last = mb_ord($str2); $i <= $last; $i++) {
338 338
                 if (!isset(self::$s_CharProperties[$i])) {
Please login to merge, or discard this patch.
src/Util/UnmanagedByteArray.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function offsetExists($offset)
41 41
     {
42
-        return is_int($offset) && 0 <= $offset  && $offset < $this->length;
42
+        return is_int($offset) && 0 <= $offset && $offset < $this->length;
43 43
     }
44 44
 
45 45
     /**
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function offsetSet($offset, $value)
61 61
     {
62
-        if (!is_int($value) || $value <0 || $value > 255) {
62
+        if (!is_int($value) || $value < 0 || $value > 255) {
63 63
             throw new \InvalidArgumentException(sprintf('%s is an invalid value for a ByteArray', $value));
64 64
         }
65 65
         if ($this->readonly) {
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
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
          * @var EdmModelVisitor $this
39 39
          */
40 40
         switch ($element->getSchemaElementKind()) {
41
-            case SchemaElementKind::Function():
41
+            case SchemaElementKind::Function ():
42 42
                 assert($element instanceof IFunction);
43 43
                 $this->processFunction($element);
44 44
                 break;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
          * @var EdmModelVisitor $this
39 39
          */
40 40
         switch ($element->getSchemaElementKind()) {
41
-            case SchemaElementKind::Function():
41
+            case SchemaElementKind::function():
42 42
                 assert($element instanceof IFunction);
43 43
                 $this->processFunction($element);
44 44
                 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
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         /*
31 31
          * @var EdmModelVisitor $this
32 32
          */
33
-        self::visitCollection($annotations, [$this,'visitAnnotation']);
33
+        self::visitCollection($annotations, [$this, 'visitAnnotation']);
34 34
     }
35 35
 
36 36
     /**
Please login to merge, or discard this patch.
src/Helpers/TypeAnnotationHelpers.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,5 +36,5 @@
 block discarded – undo
36 36
     /**
37 37
      * @return IPropertyValueBinding[] gets the value annotations for the properties of the type
38 38
      */
39
-   abstract public function getPropertyValueBindings(): array;
39
+    abstract public function getPropertyValueBindings(): array;
40 40
 }
Please login to merge, or discard this patch.
src/Helpers/ModelHelpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         /**
46 46
          * @var IModel $this
47 47
          */
48
-        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ??[];
48
+        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ?? [];
49 49
     }
50 50
     /**
51 51
      * Sets an annotation value for an EDM element. If the value is null, no annotation is added and an existing
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         /**
281 281
          * @var IModel $this
282 282
          */
283
-        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation)??[];
283
+        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation) ?? [];
284 284
     }
285 285
 
286 286
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         $navigationPropertyMappings = $model->GetAnnotationValue(SplObjectStorage::class, $entitySet, EdmConstants::InternalUri, CsdlConstants::AssociationSetNameAnnotation);
436 436
         assert($navigationPropertyMappings instanceof SplObjectStorage || $navigationPropertyMappings === null);
437 437
         if ($navigationPropertyMappings !== null && $navigationPropertyMappings->offsetExists($property)) {
438
-            $associationSetName = $navigationPropertyMappings->offsetGet($property) ;
438
+            $associationSetName = $navigationPropertyMappings->offsetGet($property);
439 439
         } else {
440 440
             $associationSetName = $model->GetAssociationName($property) . 'Set';
441 441
         }
Please login to merge, or discard this patch.
src/polyfill.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,21 +48,21 @@
 block discarded – undo
48 48
         return $code;
49 49
     }
50 50
 }
51
-if(!function_exists('iterable_to_array')) {
51
+if (!function_exists('iterable_to_array')) {
52 52
     function iterable_to_array(?iterable $it): array
53 53
     {
54
-        if(null === $it) return [];
54
+        if (null === $it) return [];
55 55
         if (is_array($it)) return $it;
56 56
         $ret = [];
57 57
         array_push($ret, ...$it);
58 58
         return $ret;
59 59
     }
60 60
 }
61
-if(!function_exists('iterable_to_traversable')) {
61
+if (!function_exists('iterable_to_traversable')) {
62 62
 
63 63
     function iterable_to_traversable(?iterable $it): Traversable
64 64
     {
65
-        if(null === $it) $it = [];
65
+        if (null === $it) $it = [];
66 66
         yield from $it;
67 67
     }
68 68
 }
69 69
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,8 +51,12 @@  discard block
 block discarded – undo
51 51
 if(!function_exists('iterable_to_array')) {
52 52
     function iterable_to_array(?iterable $it): array
53 53
     {
54
-        if(null === $it) return [];
55
-        if (is_array($it)) return $it;
54
+        if(null === $it) {
55
+            return [];
56
+        }
57
+        if (is_array($it)) {
58
+            return $it;
59
+        }
56 60
         $ret = [];
57 61
         array_push($ret, ...$it);
58 62
         return $ret;
@@ -62,7 +66,9 @@  discard block
 block discarded – undo
62 66
 
63 67
     function iterable_to_traversable(?iterable $it): Traversable
64 68
     {
65
-        if(null === $it) $it = [];
69
+        if(null === $it) {
70
+            $it = [];
71
+        }
66 72
         yield from $it;
67 73
     }
68 74
 }
69 75
\ No newline at end of file
Please login to merge, or discard this patch.