Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
In
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace Engelsystem\Http\Validation\Rules;
6
7use Respect\Validation\Rules\In as RespectIn;
8
9class In extends RespectIn
10{
11    public function __construct(mixed $haystack, bool $compareIdentical = false)
12    {
13        if (!is_array($haystack)) {
14            $haystack = explode(',', $haystack);
15        }
16
17        parent::__construct($haystack, $compareIdentical);
18    }
19}