Completed
Pull Request — master (#44)
by Alex
03:25
created
src/Enums/ValueKind.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,19 +29,19 @@
 block discarded – undo
29 29
  */
30 30
 class ValueKind extends Enum
31 31
 {
32
-    protected const None          =0;
32
+    protected const None          = 0;
33 33
     protected const Binary        = 1;
34
-    protected const Boolean       =2;
35
-    protected const Collection    =3;
36
-    protected const DateTimeOffset=4;
37
-    protected const DateTime      =5;
38
-    protected const Decimal       =6;
39
-    protected const Enum          =7;
40
-    protected const Floating      =8;
41
-    protected const Guid          =9;
42
-    protected const Integer       =10;
43
-    protected const Null          =11;
44
-    protected const String        =12;
45
-    protected const Structured    =13;
46
-    protected const Time          =14;
34
+    protected const Boolean       = 2;
35
+    protected const Collection    = 3;
36
+    protected const DateTimeOffset = 4;
37
+    protected const DateTime      = 5;
38
+    protected const Decimal       = 6;
39
+    protected const Enum          = 7;
40
+    protected const Floating      = 8;
41
+    protected const Guid          = 9;
42
+    protected const Integer       = 10;
43
+    protected const Null          = 11;
44
+    protected const String        = 12;
45
+    protected const Structured    = 13;
46
+    protected const Time          = 14;
47 47
 }
Please login to merge, or discard this patch.
src/Enums/Enum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $regexBase = '/(is)(%s)/m';
25 25
         $regexFull = sprintf($regexBase, implode('$|', array_keys($array)));
26 26
         preg_match($regexFull, $name, $match);
27
-        if (count($match)>0 && $match[0] === $name) {
27
+        if (count($match) > 0 && $match[0] === $name) {
28 28
             return $this->{$match[1] . 'Flag'}($array[$match[2]], $arguments[0] ?? null);
29 29
         }
30 30
         throw new BadMethodCallException(sprintf('Enum %s not found on %s', $name, get_class($this)));
Please login to merge, or discard this patch.
src/Interfaces/Values/IBooleanValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
     /**
18 18
      * @return bool gets a value indicating whether the value of this boolean value is true or false
19 19
      */
20
-    public function getValue(): bool ;
20
+    public function getValue(): bool;
21 21
 }
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.
src/Interfaces/Values/IFloatingValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
     /**
18 18
      * @return float gets the definition of this floating   value
19 19
      */
20
-    public function getValue(): float ;
20
+    public function getValue(): float;
21 21
 }
Please login to merge, or discard this patch.
src/Interfaces/Values/IDecimalValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
     /**
18 18
      * @return float gets the definition of this decimal  value
19 19
      */
20
-    public function getValue(): float ;
20
+    public function getValue(): float;
21 21
 }
Please login to merge, or discard this patch.
src/Interfaces/Values/IBinaryValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
     /**
18 18
      * @return string[] gets the definition of this binary value
19 19
      */
20
-    public function getValue(): array ;
20
+    public function getValue(): array;
21 21
 }
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.
Validation/Internal/InterfaceValidator/VisitorOfIBinaryTypeReference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         assert($typeRef instanceof IBinaryTypeReference);
17 17
         $primitive = $typeRef->getDefinition();
18 18
         assert($primitive instanceof IPrimitiveType);
19
-        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isBinary() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null;
19
+        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->isBinary() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
20 20
     }
21 21
 
22 22
     public function forType(): string
Please login to merge, or discard this patch.