| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 2 | private function getStyleBlocksFromMarkup($content) |
|
| 41 | { |
||
| 42 | 2 | $blocks = []; |
|
| 43 | 2 | $matches = []; |
|
| 44 | 2 | preg_match_all( |
|
| 45 | 2 | '/style=.*(url\([^#].*\))/i', |
|
| 46 | $content, |
||
| 47 | $matches |
||
| 48 | ); |
||
| 49 | 2 | if (is_array($matches) && sizeof($matches) > 1 && is_array($matches[1])) { |
|
| 50 | 2 | $blocks = $matches[1]; |
|
| 51 | } |
||
| 52 | 2 | return $blocks; |
|
| 53 | } |
||
| 54 | } |