| Conditions | 4 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function word(): ?string |
||
| 20 | { |
||
| 21 | $pages = array_values($this->payload['query']['pages']); |
||
| 22 | $text = $pages[0]['extract']; |
||
| 23 | if ($text && ((false === stripos($text, 'refer to')) || (false === stripos($text, 'refers to')))) { |
||
| 24 | return explode('.', $text)[0]; |
||
| 25 | } |
||
| 26 | |||
| 27 | return null; |
||
| 28 | } |
||
| 30 |