| Conditions | 6 |
| Paths | 4 |
| Total Lines | 31 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 6.1979 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 3 | private function extractUrlPaths($cssContent) |
|
| 35 | { |
||
| 36 | 3 | $paths = []; |
|
| 37 | 3 | $masks = []; |
|
| 38 | 3 | $matches = []; |
|
| 39 | |||
| 40 | 3 | preg_match_all( |
|
| 41 | 3 | '~url\((?!#)\s*([\'"]?)(/?(\.\./)?.*?)([\'"]?);?\s*\)~is', |
|
| 42 | $cssContent, |
||
| 43 | $matches, |
||
| 44 | 3 | PREG_PATTERN_ORDER |
|
| 45 | ); |
||
| 46 | |||
| 47 | 3 | if (!(is_array($matches) && count($matches) > 1 && is_array($matches[2]))) { |
|
| 48 | return [ |
||
| 49 | 'paths' => $paths, |
||
| 50 | 'masks' => $masks, |
||
| 51 | ]; |
||
| 52 | } |
||
| 53 | |||
| 54 | 3 | foreach ($matches[2] as $mkey => $path) { |
|
| 55 | 2 | if (str_contains($path, ',')) { |
|
| 56 | continue; |
||
| 57 | } |
||
| 58 | 2 | $paths[] = $path; |
|
| 59 | 2 | $masks[] = $matches[1][$mkey]; |
|
| 60 | } |
||
| 61 | |||
| 62 | return [ |
||
| 63 | 3 | 'paths' => $paths, |
|
| 64 | 3 | 'masks' => $masks, |
|
| 65 | ]; |
||
| 68 |
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.