Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Checked | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
4 | |
100.00% |
1 / 1 |
| isValid | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
4 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Engelsystem\Http\Validation\Rules; |
| 6 | |
| 7 | use Respect\Validation\Rules\Core\Simple; |
| 8 | |
| 9 | class Checked extends Simple |
| 10 | { |
| 11 | public function isValid(mixed $input): bool |
| 12 | { |
| 13 | return $input && $input !== 'false' && $input !== 'off' && $input !== 'no'; |
| 14 | } |
| 15 | } |