Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 2 | private function createBooleanInput(string $name, bool $required = true): Input |
|
22 | { |
||
23 | 2 | $input = $this->createInput($name, $required); |
|
24 | 2 | $input->getFilterChain()->attach(new Filter\Boolean()); |
|
25 | 2 | $input->getValidatorChain()->attach(new Validator\NotEmpty(['type' => [ |
|
26 | 2 | Validator\NotEmpty::OBJECT, |
|
27 | 2 | Validator\NotEmpty::SPACE, |
|
28 | 2 | Validator\NotEmpty::NULL, |
|
29 | 2 | Validator\NotEmpty::EMPTY_ARRAY, |
|
30 | 2 | Validator\NotEmpty::STRING, |
|
31 | ]])); |
||
32 | |||
33 | 2 | return $input; |
|
34 | } |
||
36 |