Passed
Push — master ( aa9102...48acef )
by Smoren
04:06 queued 01:50
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/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.
src/Factories/Checks/ContainerCheckFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public static function getLengthIsCheck(IntegerRuleInterface $rule): CheckInterface
106 106
     {
107 107
         return CheckBuilder::create(CheckName::LENGTH_IS)
108
-            ->withPredicate(static function ($value) use ($rule) {
108
+            ->withPredicate(static function($value) use ($rule) {
109 109
                 /** @var \Countable $value */
110 110
                 $rule->validate(\count($value));
111 111
                 return true;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     public static function getHasOptionalAttributeCheck(string $name, MixedRuleInterface $rule): CheckInterface
126 126
     {
127 127
         return CheckBuilder::create(CheckName::HAS_ATTRIBUTE)
128
-            ->withPredicate(static function ($value) use ($name, $rule) {
128
+            ->withPredicate(static function($value) use ($name, $rule) {
129 129
                 if (!ContainerAccessHelper::hasAccessibleAttribute($value, $name)) {
130 130
                     return true;
131 131
                 }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     public static function getAttributeIsCheck(string $name, MixedRuleInterface $rule): CheckInterface
140 140
     {
141 141
         return CheckBuilder::create(CheckName::ATTRIBUTE_IS)
142
-            ->withPredicate(static function ($value, string $name) use ($rule) {
142
+            ->withPredicate(static function($value, string $name) use ($rule) {
143 143
                 $rule->validate(ContainerAccessHelper::getAttributeValue($value, $name));
144 144
                 return true;
145 145
             })
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     public static function getAllKeysAreCheck(MixedRuleInterface $rule): CheckInterface
152 152
     {
153 153
         return CheckBuilder::create(CheckName::ALL_KEYS_ARE)
154
-            ->withPredicate(static function ($value) use ($rule) {
154
+            ->withPredicate(static function($value) use ($rule) {
155 155
                 foreach ($value as $k => $v) {
156 156
                     $rule->validate($k);
157 157
                 }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     public static function getAllValuesAreCheck(MixedRuleInterface $rule): CheckInterface
165 165
     {
166 166
         return CheckBuilder::create(CheckName::ALL_VALUES_ARE)
167
-            ->withPredicate(static function ($value) use ($rule) {
167
+            ->withPredicate(static function($value) use ($rule) {
168 168
                 foreach ($value as $v) {
169 169
                     $rule->validate($v);
170 170
                 }
Please login to merge, or discard this patch.