Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Lines | 15 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
31 | View Code Duplication | public function parse(DOMDocument $dom, DOMXPath $xpath) : DateTimeImmutable |
|
32 | { |
||
33 | $openingDateHolder = $xpath->query('//div[./div/span[contains(text(), "' . self::OPENING_STRING . '")]]'); |
||
34 | |||
35 | if (! $openingDateHolder || $openingDateHolder->length == 0) { |
||
36 | throw new InvalidArgumentException('No CfP-Open Date found'); |
||
37 | } |
||
38 | |||
39 | $openingDay = $openingDateHolder->item(0)->getElementsByTagName('h2')->item(0)->textContent; |
||
40 | $openingHour = $openingDateHolder->item(0)->getElementsByTagName('span')->item(0)->textContent; |
||
41 | |||
42 | $openingHour = $this->clearOpeningHour($openingHour); |
||
43 | |||
44 | return new DateTimeImmutable($openingDay. ' ' . $openingHour, $this->timezone); |
||
45 | } |
||
46 | |||
52 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.