Passed
Push — master ( 3cace9...606d11 )
by Smoren
02:46
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
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         return $this->check(
35 35
             CheckBuilder::create(CheckName::FRACTIONAL)
36
-                ->withPredicate(fn ($value) => \abs($value - \round($value)) >= \PHP_FLOAT_EPSILON)
36
+                ->withPredicate(fn ($value) => \abs($value-\round($value)) >= \PHP_FLOAT_EPSILON)
37 37
                 ->build()
38 38
         );
39 39
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         return $this->check(
49 49
             CheckBuilder::create(CheckName::NON_FRACTIONAL)
50
-                ->withPredicate(fn ($value) => \abs($value - \round($value)) < \PHP_FLOAT_EPSILON)
50
+                ->withPredicate(fn ($value) => \abs($value-\round($value)) < \PHP_FLOAT_EPSILON)
51 51
                 ->build()
52 52
         );
53 53
     }
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
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         return $this->check(
35 35
             CheckBuilder::create(CheckName::EVEN)
36
-                ->withPredicate(fn ($value) => $value % 2 === 0)
36
+                ->withPredicate(fn ($value) => $value%2 === 0)
37 37
                 ->build()
38 38
         );
39 39
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         return $this->check(
49 49
             CheckBuilder::create(CheckName::ODD)
50
-                ->withPredicate(fn ($value) => $value % 2 !== 0)
50
+                ->withPredicate(fn ($value) => $value%2 !== 0)
51 51
                 ->build()
52 52
         );
53 53
     }
Please login to merge, or discard this patch.
src/Rules/ContainerMixedRule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     {
187 187
         return $this->check(
188 188
             CheckBuilder::create(CheckName::LENGTH_IS)
189
-                ->withPredicate(static function ($value) use ($rule) {
189
+                ->withPredicate(static function($value) use ($rule) {
190 190
                     /** @var \Countable $value */
191 191
                     $rule->validate(\count($value));
192 192
                     return true;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
         return $this->check(
211 211
             CheckBuilder::create(CheckName::ATTRIBUTE_IS)
212
-                ->withPredicate(static function ($value, string $name) use ($rule) {
212
+                ->withPredicate(static function($value, string $name) use ($rule) {
213 213
                     $rule->validate(ContainerAccessHelper::getAttributeValue($value, $name));
214 214
                     return true;
215 215
                 })
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     {
229 229
         return $this->check(
230 230
             CheckBuilder::create(CheckName::HAS_ATTRIBUTE)
231
-                ->withPredicate(static function ($value) use ($name, $rule) {
231
+                ->withPredicate(static function($value) use ($name, $rule) {
232 232
                     if (!ContainerAccessHelper::hasAccessibleAttribute($value, $name)) {
233 233
                         return true;
234 234
                     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         return $this->check(
251 251
             CheckBuilder::create(CheckName::ALL_KEYS_ARE)
252
-                ->withPredicate(static function ($value) use ($rule) {
252
+                ->withPredicate(static function($value) use ($rule) {
253 253
                     foreach ($value as $k => $v) {
254 254
                         $rule->validate($k);
255 255
                     }
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     {
270 270
         return $this->check(
271 271
             CheckBuilder::create(CheckName::ALL_VALUES_ARE)
272
-                ->withPredicate(static function ($value) use ($rule) {
272
+                ->withPredicate(static function($value) use ($rule) {
273 273
                     foreach ($value as $v) {
274 274
                         $rule->validate($v);
275 275
                     }
Please login to merge, or discard this patch.
src/Rules/StringMixedRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
     {
85 85
         return $this->check(
86 86
             CheckBuilder::create(CheckName::ENDS_WITH)
87
-                ->withPredicate(static function ($value, string $substr) {
88
-                    return \substr($value, \mb_strlen($value) - \mb_strlen($substr)) === $substr;
87
+                ->withPredicate(static function($value, string $substr) {
88
+                    return \substr($value, \mb_strlen($value)-\mb_strlen($substr)) === $substr;
89 89
                 })
90 90
                 ->withParams(['substring' => $substr])
91 91
                 ->build()
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         return $this->check(
98 98
             CheckBuilder::create(CheckName::LENGTH_IS)
99
-                ->withPredicate(static function ($value) use ($rule) {
99
+                ->withPredicate(static function($value) use ($rule) {
100 100
                     /** @var string $value */
101 101
                     $rule->validate(\mb_strlen($value));
102 102
                     return true;
Please login to merge, or discard this patch.