| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | function find_contains( |
||
| 17 | \voku\helper\HtmlDomParser $dom, |
||
| 18 | string $selector, |
||
| 19 | string $keyword |
||
| 20 | ) { |
||
| 21 | // init |
||
| 22 | $elements = new SimpleHtmlDomNode(); |
||
| 23 | |||
| 24 | foreach ($dom->find($selector) as $e) { |
||
| 25 | if (strpos($e->innerText(), $keyword) !== false) { |
||
| 26 | $elements[] = $e; |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | return $elements; |
||
| 31 | } |
||
| 32 | |||
| 46 |