Conditions | 6 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
48 | 1 | public function isSupportsMethod(string $method): bool |
|
49 | { |
||
50 | 1 | if (empty($this->only) && empty($this->except)) { |
|
51 | 1 | return true; |
|
52 | } |
||
53 | |||
54 | 1 | if (\in_array($method, $this->only, true)) { |
|
55 | 1 | return true; |
|
56 | } |
||
57 | |||
58 | 1 | if (!empty($this->except) && !\in_array($method, $this->except, true)) { |
|
59 | 1 | return true; |
|
60 | } |
||
61 | |||
62 | 1 | return false; |
|
63 | } |
||
65 |