| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | View Code Duplication | public function parse(DOMDocument $dom, DOMXPath $xpath) : DateTimeImmutable |
|
| 30 | { |
||
| 31 | $closingDateHolder = $xpath->query('//div[./div/span[contains(text(), "CfS closes at")]]'); |
||
| 32 | |||
| 33 | if (! $closingDateHolder || $closingDateHolder->length == 0) { |
||
| 34 | throw new InvalidArgumentException('The CfP does not seem to have a closing date'); |
||
| 35 | } |
||
| 36 | |||
| 37 | $closingDay = $closingDateHolder->item(0)->getElementsByTagName('h2')->item(0)->textContent; |
||
| 38 | $closingHour = $closingDateHolder->item(0)->getElementsByTagName('span')->item(0)->textContent; |
||
| 39 | |||
| 40 | $closingHour = $this->clearClosingHour($closingHour); |
||
| 41 | |||
| 42 | return new DateTimeImmutable($closingDay . ' ' . $closingHour, $this->timezone); |
||
| 43 | } |
||
| 44 | |||
| 50 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.