Passed
Push — master ( 85dd85...c5a948 )
by Smoren
02:32
created
src/Rules/StringRule.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.
src/Rules/ContainerRule.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/Factories/Value.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      *
101 101
      * @return CompositeRuleInterface
102 102
      */
103
-    public static function anyOf(array $rules, string $name = RuleName::OR): CompositeRuleInterface
103
+    public static function anyOf(array $rules, string $name = RuleName:: OR ): CompositeRuleInterface
104 104
     {
105 105
         return new AnyOfRule($rules, $name);
106 106
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @return CompositeRuleInterface
113 113
      */
114
-    public static function allOf(array $rules, string $name = RuleName::AND): CompositeRuleInterface
114
+    public static function allOf(array $rules, string $name = RuleName:: AND ): CompositeRuleInterface
115 115
     {
116 116
         return new AllOfRule($rules, $name);
117 117
     }
Please login to merge, or discard this patch.
src/Factories/Checks/NumericCheckFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,14 +163,14 @@  discard block
 block discarded – undo
163 163
     public static function getFractionalCheck(): CheckInterface
164 164
     {
165 165
         return CheckBuilder::create(CheckName::FRACTIONAL)
166
-            ->withPredicate(fn($value) => \abs($value - \round(\floatval($value))) >= \PHP_FLOAT_EPSILON)
166
+            ->withPredicate(fn($value) => \abs($value-\round(\floatval($value))) >= \PHP_FLOAT_EPSILON)
167 167
             ->build();
168 168
     }
169 169
 
170 170
     public static function getNonFractionalCheck(): CheckInterface
171 171
     {
172 172
         return CheckBuilder::create(CheckName::NON_FRACTIONAL)
173
-            ->withPredicate(fn($value) => \abs($value - \round(\floatval($value))) < \PHP_FLOAT_EPSILON)
173
+            ->withPredicate(fn($value) => \abs($value-\round(\floatval($value))) < \PHP_FLOAT_EPSILON)
174 174
             ->build();
175 175
     }
176 176
 
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
     public static function getEvenCheck(): CheckInterface
192 192
     {
193 193
         return CheckBuilder::create(CheckName::EVEN)
194
-            ->withPredicate(fn($value) => $value % 2 === 0)
194
+            ->withPredicate(fn($value) => $value%2 === 0)
195 195
             ->build();
196 196
     }
197 197
 
198 198
     public static function getOddCheck(): CheckInterface
199 199
     {
200 200
         return CheckBuilder::create(CheckName::ODD)
201
-            ->withPredicate(fn($value) => $value % 2 !== 0)
201
+            ->withPredicate(fn($value) => $value%2 !== 0)
202 202
             ->build();
203 203
     }
204 204
 
Please login to merge, or discard this patch.