| Conditions | 9 |
| Paths | 7 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | protected function isValidArray($arr, $insanceOf, $minCount = -1, $maxCount = -1) |
||
| 42 | { |
||
| 43 | if (null == $arr) { |
||
| 44 | return false; |
||
| 45 | } |
||
| 46 | if (!is_array($arr)) { |
||
| 47 | return false; |
||
| 48 | } |
||
| 49 | if ($minCount != -1 && count($arr) < $minCount) { |
||
| 50 | return false; |
||
| 51 | } |
||
| 52 | if ($maxCount != -1 && count($arr) > $maxCount) { |
||
| 53 | return false; |
||
| 54 | } |
||
| 55 | foreach ($arr as $item) { |
||
| 56 | if (!($item instanceof $insanceOf)) { |
||
| 57 | return false; |
||
| 58 | } |
||
| 59 | } |
||
| 60 | return true; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.