@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public static function getLengthIsCheck(IntegerRuleInterface $rule): CheckInterface |
108 | 108 | { |
109 | 109 | return CheckBuilder::create(CheckName::LENGTH_IS) |
110 | - ->withPredicate(static function ($value) use ($rule) { |
|
110 | + ->withPredicate(static function($value) use ($rule) { |
|
111 | 111 | /** @var \Countable $value */ |
112 | 112 | $rule->validate(\count($value)); |
113 | 113 | return true; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | public static function getHasOptionalAttributeCheck(string $name, MixedRuleInterface $rule): CheckInterface |
128 | 128 | { |
129 | 129 | return CheckBuilder::create(CheckName::ATTRIBUTE_IS) |
130 | - ->withPredicate(static function ($value, string $name) use ($rule) { |
|
130 | + ->withPredicate(static function($value, string $name) use ($rule) { |
|
131 | 131 | if (!ContainerAccessHelper::hasAccessibleAttribute($value, $name)) { |
132 | 132 | return true; |
133 | 133 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | public static function getAttributeIsCheck(string $name, MixedRuleInterface $rule): CheckInterface |
142 | 142 | { |
143 | 143 | return CheckBuilder::create(CheckName::ATTRIBUTE_IS) |
144 | - ->withPredicate(static function ($value, string $name) use ($rule) { |
|
144 | + ->withPredicate(static function($value, string $name) use ($rule) { |
|
145 | 145 | $rule->validate(ContainerAccessHelper::getAttributeValue($value, $name)); |
146 | 146 | return true; |
147 | 147 | }) |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public static function getValueByIndexCheck(int $index, MixedRuleInterface $rule): CheckInterface |
163 | 163 | { |
164 | 164 | return CheckBuilder::create(CheckName::VALUE_BY_INDEX_IS) |
165 | - ->withPredicate(static function ($value, int $index) use ($rule) { |
|
165 | + ->withPredicate(static function($value, int $index) use ($rule) { |
|
166 | 166 | $rule->validate($value[$index]); |
167 | 167 | return true; |
168 | 168 | }) |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | public static function getAllKeysAreCheck(MixedRuleInterface $rule): CheckInterface |
175 | 175 | { |
176 | 176 | return CheckBuilder::create(CheckName::ALL_KEYS_ARE) |
177 | - ->withPredicate(static function ($value) use ($rule) { |
|
177 | + ->withPredicate(static function($value) use ($rule) { |
|
178 | 178 | foreach ($value as $k => $v) { |
179 | 179 | $rule->validate($k); |
180 | 180 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | public static function getAllValuesAreCheck(MixedRuleInterface $rule): CheckInterface |
188 | 188 | { |
189 | 189 | return CheckBuilder::create(CheckName::ALL_VALUES_ARE) |
190 | - ->withPredicate(static function ($value) use ($rule) { |
|
190 | + ->withPredicate(static function($value) use ($rule) { |
|
191 | 191 | foreach ($value as $v) { |
192 | 192 | $rule->validate($v); |
193 | 193 | } |
@@ -120,7 +120,7 @@ |
||
120 | 120 | public function dontStopOnViolation(): self |
121 | 121 | { |
122 | 122 | if (\count($this->checks) > 0) { |
123 | - $this->checks[\count($this->checks) - 1]->setInterrupting(false); |
|
123 | + $this->checks[\count($this->checks)-1]->setInterrupting(false); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | return $this; |