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