Passed
Pull Request — master (#44)
by Alex
03:15
created
src/Util/XmlCharType.php 1 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/Util/ExpressionTypeChecker.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 // If we don't have the applied function we just assume that it will work.
200 200
                 $discoveredErrors = [];
201 201
                 return true;
202
-            case ExpressionKind::If():
202
+            case ExpressionKind::If ():
203 203
                 assert($expression instanceof IIfExpression);
204 204
                 return self::TryAssertIfAsType($expression, $type, $context, $matchExactly, $discoveredErrors);
205 205
             case ExpressionKind::IsType():
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
         iterable &$discoveredErrors
298 298
     ): bool {
299 299
         if (!$type->IsPrimitive()) {
300
-            $discoveredErrors =  [
300
+            $discoveredErrors = [
301 301
                 new EdmError(
302 302
                     $expression->Location(),
303 303
                     EdmErrorCode::PrimitiveConstantExpressionNotValidForNonPrimitiveType(),
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
                 return self::TryAssertIntegerConstantInRange(
758 758
                     $expression,
759 759
                     (int)-9223372036854775808,
760
-                    (int)999999999999,
760
+                    (int) 999999999999,
761 761
                     $discoveredErrors
762 762
                 );
763 763
             case PrimitiveTypeKind::Int32():
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
                     $discoveredErrors
790 790
                 );
791 791
             default:
792
-                $discoveredErrors =  [
792
+                $discoveredErrors = [
793 793
                     new EdmError(
794 794
                         $expression->Location(),
795 795
                         EdmErrorCode::ExpressionPrimitiveKindNotValidForAssertedType(),
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
 
910 910
             if ($expressionType->getTypeKind()->isPrimitive() && $assertedType->getTypeKind()->isPrimitive()) {
911 911
                 $primitiveExpressionType = $expressionType;
912
-                $primitiveAssertedType   = $assertedType ;
912
+                $primitiveAssertedType   = $assertedType;
913 913
                 assert($primitiveExpressionType instanceof IPrimitiveType);
914 914
                 assert($primitiveAssertedType instanceof IPrimitiveType);
915 915
                 if (!self::PromotesTo(
Please login to merge, or discard this patch.
src/ModelVisitorConcerns/VisitElements.php 1 patch
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.
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/ToTraceString.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             case $element instanceof IProperty:
50 50
                 assert($element instanceof IProperty);
51 51
                 $type = $element->getType();
52
-                return $element->getName() ?? '' . ':' . ($type !== null ? self::ToTraceString($type) :'');
52
+                return $element->getName() ?? '' . ':' . ($type !== null ? self::ToTraceString($type) : '');
53 53
             case $element instanceof IEntityReferenceType:
54 54
                 assert($element instanceof IEntityReferenceType);
55 55
                 return TypeKind::EntityReference()->getKey() . '(' . ($element->getEntityType() !== null ? self::ToTraceString($element->getEntityType()) : '') . ')';
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             $sb,
171 171
             EdmConstants::FacetName_Srid,
172 172
             null !== $type->getSpatialReferenceIdentifier()
173
-                ? $type->getSpatialReferenceIdentifier(): EdmConstants::Value_SridVariable
173
+                ? $type->getSpatialReferenceIdentifier() : EdmConstants::Value_SridVariable
174 174
         );
175 175
         return $sb;
176 176
     }
Please login to merge, or discard this patch.
src/Helpers/ModelHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -420,7 +420,7 @@
 block discarded – undo
420 420
         $navigationPropertyMappings = $model->GetAnnotationValue(SplObjectStorage::class, $entitySet, EdmConstants::InternalUri, CsdlConstants::AssociationSetNameAnnotation);
421 421
         assert($navigationPropertyMappings instanceof SplObjectStorage || $navigationPropertyMappings === null);
422 422
         if ($navigationPropertyMappings !== null && $navigationPropertyMappings->offsetExists($property)) {
423
-            $associationSetName = $navigationPropertyMappings->offsetGet($property) ;
423
+            $associationSetName = $navigationPropertyMappings->offsetGet($property);
424 424
         } else {
425 425
             $associationSetName = $model->GetAssociationName($property) . 'Set';
426 426
         }
Please login to merge, or discard this patch.
src/Version.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     private static function fillVersions()
69 69
     {
70 70
         if (null === self::$fixedVersion) {
71
-            self::$fixedVersion = [1 => new self(1, 0), 11 => new self(1, 1), 12 => new self(1, 2),2 => new self(2, 0), 3 => new self(3, 0)];
71
+            self::$fixedVersion = [1 => new self(1, 0), 11 => new self(1, 1), 12 => new self(1, 2), 2 => new self(2, 0), 3 => new self(3, 0)];
72 72
         }
73 73
     }
74 74
 
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.