Passed
Pull Request — master (#156)
by Alex
03:41
created
Internal/InterfaceValidator/VisitorOfIParameterReferenceExpression.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
             $references[] = $expression->getReferencedParameter();
18 18
             return null;
19 19
         } else {
20
-            return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedParameter') ];
20
+            return [InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedParameter')];
21 21
         }
22 22
     }
23 23
 
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfICollectionType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
             $followup[] = $type->getElementType();
19 19
             return null;
20 20
         } else {
21
-            return[ InterfaceValidator::CreatePropertyMustNotBeNullError($type, 'ElementType')];
21
+            return[InterfaceValidator::CreatePropertyMustNotBeNullError($type, 'ElementType')];
22 22
         }
23 23
     }
24 24
 
Please login to merge, or discard this patch.
src/Edm/Validation/ValidationRules/IPrimitiveValue/PrimitiveValueRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
 {
13 13
     public function getValidatedType(): string
14 14
     {
15
-        return IPrimitiveValue::class ;
15
+        return IPrimitiveValue::class;
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
ImmediateValueAnnotationElementAnnotationHasNameAndNamespace.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@
 block discarded – undo
36 36
                     ) ?? false
37 37
             )) {
38 38
                 $error = null;
39
-                if (!
40
-                ValidationHelper::ValidateValueCanBeWrittenAsXmlElementAnnotation(
39
+                if (!ValidationHelper::ValidateValueCanBeWrittenAsXmlElementAnnotation(
41 40
                     $stringValue,
42 41
                     $annotation->getNamespaceUri(),
43 42
                     $annotation->getName(),
Please login to merge, or discard this patch.
src/Edm/Validation/EdmValidator.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
     public static function Validate(IModel $root, $versionOrRuleset, array &$errors): bool
28 28
     {
29 29
         $ruleSet = $versionOrRuleset instanceof Version ?
30
-            ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) :
31
-            $versionOrRuleset;
30
+            ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) : $versionOrRuleset;
32 31
         assert($ruleSet instanceof ValidationRuleSet);
33 32
         $errors = InterfaceValidator::ValidateModelStructureAndSemantics($root, $ruleSet);
34 33
         return count($errors) === 0;
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 2 patches
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.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                     );
175 175
                 }
176 176
                 return self::TryAssertPrimitiveAsType($primitiveValue, $type, $discoveredErrors);
177
-            case ExpressionKind::Null():
177
+            case ExpressionKind::null():
178 178
                 assert($expression instanceof INullExpression);
179 179
                 return self::TryAssertNullAsType($expression, $type, $discoveredErrors);
180 180
             case ExpressionKind::Path():
@@ -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():
Please login to merge, or discard this patch.
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/Interfaces/Values/IDateTimeValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
     /**
20 20
      * @return DateTime gets the definition of this datetime value
21 21
      */
22
-    public function getValue(): DateTime ;
22
+    public function getValue(): DateTime;
23 23
 }
Please login to merge, or discard this patch.