Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Rossedman\Teamwork; |
||
52 | protected function areArgumentsValid($args, array $accepted) |
||
53 | { |
||
54 | if ($args == null) |
||
55 | { |
||
56 | return; |
||
57 | } |
||
58 | |||
59 | foreach ($accepted as $accept) |
||
60 | { |
||
61 | if (array_key_exists($accept, $args)) |
||
62 | { |
||
63 | return true; |
||
64 | } |
||
65 | } |
||
66 | |||
67 | throw new \InvalidArgumentException('This call only accepts these arguments: ' . implode(" | ",$accepted)); |
||
68 | } |
||
69 | } |