| @@ 39-46 (lines=8) @@ | ||
| 36 | throw new InvalidArgumentException('The value passed must be an instance of Carbon\\Carbon or DateTime'); |
|
| 37 | } |
|
| 38 | ||
| 39 | public function isArray($value) |
|
| 40 | { |
|
| 41 | if (is_array($value) && count($value) > 0) { |
|
| 42 | return true; |
|
| 43 | } |
|
| 44 | ||
| 45 | throw new InvalidArgumentException('The value passed must be an array'); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function isIterable($value) |
|
| 49 | { |
|
| @@ 48-55 (lines=8) @@ | ||
| 45 | throw new InvalidArgumentException('The value passed must be an array'); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function isIterable($value) |
|
| 49 | { |
|
| 50 | if((is_array($value) || $value instanceof Traversable) && count($value) > 0) { |
|
| 51 | return true; |
|
| 52 | } |
|
| 53 | ||
| 54 | throw new InvalidArgumentException('The value passed must be iterable'); |
|
| 55 | } |
|
| 56 | } |
|