| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | private function resolveImages(string $content): array |
||
| 60 | { |
||
| 61 | $pattern = '#(?:<a[^>]+?href=["|\'](?P<link_urls>[^\s]+?)["|\'][^>]*?>\s*)' |
||
| 62 | . '?(?P<img_tags><img[^>]+?src=["|\'](?P<img_urls>[^\s]+?)["|\'].*?>){1}' |
||
| 63 | . '(?:\s*</a>)?#is'; |
||
| 64 | |||
| 65 | if (!preg_match_all($pattern, $content, $images)) { |
||
| 66 | return []; |
||
| 67 | } |
||
| 68 | |||
| 69 | $images = array_filter($images, 'is_string', ARRAY_FILTER_USE_KEY); |
||
| 70 | |||
| 71 | return $images; |
||
| 72 | } |
||
| 92 |