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