| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | protected function areArgumentsValid($args, array $accepted) |
||
| 50 | { |
||
| 51 | if ($args == null) { |
||
| 52 | return null; |
||
| 53 | } |
||
| 54 | |||
| 55 | foreach ($args as $arg => $value) { |
||
| 56 | if (!in_array($arg, $accepted)) { |
||
| 57 | throw new \InvalidArgumentException('This call only accepts these arguments: ' . implode(" | ", $accepted)); |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 61 | return true; |
||
| 62 | } |
||
| 63 | } |