| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | 3 | public function find(Crawler $crawler) |
|
| 11 | { |
||
| 12 | try { |
||
| 13 | 3 | $description = $crawler->filterXPath('//meta[@property="og:description"]')->attr('content'); |
|
| 14 | |||
| 15 | 1 | return empty($description) ? null : $description; |
|
| 16 | 2 | } catch (\InvalidArgumentException $e) { |
|
| 17 | 2 | return null; |
|
| 18 | } |
||
| 19 | } |
||
| 20 | } |
||
| 21 |