Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
ShirtSize | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Engelsystem\Http\Validation\Rules; |
6 | |
7 | use Respect\Validation\Rules\In; |
8 | |
9 | /** |
10 | * Validates whether the value is contained in the keys of the config item "tshirt_sizes". |
11 | */ |
12 | class ShirtSize extends In |
13 | { |
14 | public function __construct() |
15 | { |
16 | parent::__construct(array_keys(config('tshirt_sizes'))); |
17 | } |
18 | } |