Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public static function assert(array $methods) |
||
12 | { |
||
13 | $methods = array_map('strtolower', $methods); |
||
14 | |||
15 | foreach ($methods as $method) { |
||
16 | if (!in_array($method, self::ALLOWED_METHODS)) { |
||
17 | throw new InvalidArgumentException('Method "' . $method . '" is not valid, only the following methods are allowed: ' . join(', ', self::ALLOWED_METHODS)); |
||
18 | } |
||
19 | } |
||
20 | } |
||
21 | } |