Passed
Push — master ( 377e47...6b2425 )
by Smoren
02:22
created
src/Factories/Value.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      *
66 66
      * @return CompositeRuleInterface
67 67
      */
68
-    public static function or(array $rules, string $name = RuleName::OR): CompositeRuleInterface
68
+    public static function or(array $rules, string $name = RuleName:: OR ): CompositeRuleInterface
69 69
     {
70 70
         return new OrRule($rules, $name);
71 71
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      *
77 77
      * @return CompositeRuleInterface
78 78
      */
79
-    public static function and(array $rules, string $name = RuleName::AND): CompositeRuleInterface
79
+    public static function and(array $rules, string $name = RuleName:: AND ): CompositeRuleInterface
80 80
     {
81 81
         return new AndRule($rules, $name);
82 82
     }
Please login to merge, or discard this patch.
src/Rules/FloatRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         return $this->check(new Check(
38 38
             CheckName::FRACTIONAL,
39 39
             CheckErrorName::NOT_FRACTIONAL,
40
-            fn ($value) => \abs($value - \round($value)) >= PHP_FLOAT_EPSILON
40
+            fn ($value) => \abs($value-\round($value)) >= PHP_FLOAT_EPSILON
41 41
         ));
42 42
     }
43 43
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         return $this->check(new Check(
52 52
             CheckName::NOT_FRACTIONAL,
53 53
             CheckErrorName::FRACTIONAL,
54
-            fn ($value) => \abs($value - \round($value)) < PHP_FLOAT_EPSILON
54
+            fn ($value) => \abs($value-\round($value)) < PHP_FLOAT_EPSILON
55 55
         ));
56 56
     }
57 57
 
Please login to merge, or discard this patch.
src/Rules/IntegerRule.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
         return $this->check(new Check(
36 36
             CheckName::EVEN,
37 37
             CheckErrorName::NOT_EVEN,
38
-            fn ($value) => $value % 2 === 0,
38
+            fn ($value) => $value%2 === 0,
39 39
         ));
40 40
     }
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         return $this->check(new Check(
50 50
             CheckName::ODD,
51 51
             CheckErrorName::NOT_ODD,
52
-            fn ($value) => $value % 2 !== 0
52
+            fn ($value) => $value%2 !== 0
53 53
         ));
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/Rules/StringRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         return $this->check(new Check(
83 83
             CheckName::STARTS_WITH,
84 84
             CheckErrorName::NOT_STARTS_WITH,
85
-            fn ($value) => \mb_strpos($value, $substr) === \mb_strlen($value) - \mb_strlen($substr)
85
+            fn ($value) => \mb_strpos($value, $substr) === \mb_strlen($value)-\mb_strlen($substr)
86 86
         ));
87 87
     }
88 88
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         return $this->check(new Check(
92 92
             CheckName::LENGTH_IS,
93 93
             CheckErrorName::BAD_LENGTH,
94
-            static function ($value) use ($rule) {
94
+            static function($value) use ($rule) {
95 95
                 /** @var string $value */
96 96
                 $rule->validate(\mb_strlen($value));
97 97
                 return true;
Please login to merge, or discard this patch.
src/Rules/ContainerRule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     {
190 190
         return $this->check(
191 191
             CheckBuilder::create(CheckName::LENGTH_IS, CheckErrorName::BAD_LENGTH)
192
-                ->withPredicate(static function ($value) use ($rule) {
192
+                ->withPredicate(static function($value) use ($rule) {
193 193
                     /** @var \Countable $value */
194 194
                     $rule->validate(\count($value));
195 195
                     return true;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         return $this->check(
214 214
             CheckBuilder::create(CheckName::HAS_ATTRIBUTE, CheckErrorName::BAD_ATTRIBUTE)
215
-                ->withPredicate(static function ($value, string $name) use ($rule) {
215
+                ->withPredicate(static function($value, string $name) use ($rule) {
216 216
                     $rule->validate(ContainerAccessHelper::getAttributeValue($value, $name));
217 217
                     return true;
218 218
                 })
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     {
232 232
         return $this->check(
233 233
             CheckBuilder::create(CheckName::HAS_ATTRIBUTE, CheckErrorName::BAD_ATTRIBUTE)
234
-                ->withPredicate(static function ($value) use ($name, $rule) {
234
+                ->withPredicate(static function($value) use ($name, $rule) {
235 235
                     if (!ContainerAccessHelper::hasAccessibleAttribute($value, $name)) {
236 236
                         return true;
237 237
                     }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     {
253 253
         return $this->check(
254 254
             CheckBuilder::create(CheckName::ALL_KEYS_ARE, CheckErrorName::SOME_KEYS_BAD)
255
-                ->withPredicate(static function ($value) use ($rule) {
255
+                ->withPredicate(static function($value) use ($rule) {
256 256
                     foreach ($value as $k => $v) {
257 257
                         $rule->validate($k);
258 258
                     }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     {
273 273
         return $this->check(
274 274
             CheckBuilder::create(CheckName::ALL_VALUES_ARE, CheckErrorName::SOME_VALUES_BAD)
275
-                ->withPredicate(static function ($value) use ($rule) {
275
+                ->withPredicate(static function($value) use ($rule) {
276 276
                     foreach ($value as $v) {
277 277
                         $rule->validate($v);
278 278
                     }
Please login to merge, or discard this patch.