Lines 100.00% 3 / 3
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 2 / 2 100.00% 1 / 1 2
 validate 100.00% 1 / 1 100.00% 1 / 1 1
9readonly class NameFilter extends Filter
10{
11    public function __construct(
12        public string $name,
13    ) {
14        if (!self::validate($name)) {
15            throw new InvalidArgumentException();
16        }
17    }
18
19    private static function validate(string $name): bool
20    {
21        return $name !== "";
22    }
23}