Conditions | 4 |
Paths | 6 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.1755 |
Changes | 0 |
1 | <?php |
||
29 | 2 | public function resolve() |
|
30 | { |
||
31 | 2 | $guards = []; |
|
32 | 2 | if (!is_array($this->guard)) { |
|
33 | 2 | $guards[] = $this->guard; |
|
34 | } |
||
35 | else |
||
36 | $guards = $this->guard; |
||
37 | |||
38 | 2 | foreach ($guards as $guard) { |
|
39 | 2 | if (!($guard instanceof GuardContract)) |
|
40 | throw new UnexpectedTypeException($guard, GuardContract::class); |
||
41 | } |
||
42 | 2 | return $guards; |
|
43 | } |
||
47 |