| Conditions | 9 |
| Paths | 7 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | protected function isValidArray($arr, $insanceOf, $minCount = -1, $maxCount = -1){ |
||
| 40 | if(null == $arr){ |
||
| 41 | return false; |
||
| 42 | } |
||
| 43 | if(!is_array ($arr)){ |
||
| 44 | return false; |
||
| 45 | } |
||
| 46 | if($minCount != -1 && count($arr) < $minCount){ |
||
| 47 | return false; |
||
| 48 | } |
||
| 49 | if($maxCount != -1 && count($arr) > $maxCount){ |
||
| 50 | return false; |
||
| 51 | } |
||
| 52 | foreach($arr as $item){ |
||
| 53 | if(!($item instanceof $insanceOf)){ |
||
| 54 | return false; |
||
| 55 | } |
||
| 56 | } |
||
| 57 | return true; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |
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.