| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | function blink() |
||
| 7 | { |
||
| 8 | $arguments = func_get_args(); |
||
| 9 | |||
| 10 | if (empty($arguments)) { |
||
| 11 | return app('blink'); |
||
| 12 | } |
||
| 13 | |||
| 14 | if (count($arguments) === 1) { |
||
| 15 | return app('blink')->get($arguments[0]); |
||
| 16 | } |
||
| 17 | |||
| 18 | if (count($arguments) === 2) { |
||
| 19 | return app('blink')->once($arguments[0], $arguments[1]); |
||
| 20 | } |
||
| 21 | |||
| 22 | throw new InvalidArgumentException('blink() expects 0, 1 or 2 arguments'); |
||
| 23 | } |
||
| 24 |