| Conditions | 5 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public static function isIgnored($path) |
||
| 40 | { |
||
| 41 | $ignorePatterns = config('microscope.ignore'); |
||
| 42 | if (is_array($ignorePatterns) == false || is_string($path) == false) { |
||
|
|
|||
| 43 | return false; |
||
| 44 | } |
||
| 45 | |||
| 46 | foreach ($ignorePatterns as $ignorePattern) { |
||
| 47 | if (fnmatch(rtrim(base_path(), '\\/').'/'.ltrim($ignorePattern, '\\/'), $path)) { |
||
| 48 | return true; |
||
| 49 | } |
||
| 50 | } |
||
| 51 | |||
| 52 | return false; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.