@@ -41,7 +41,7 @@ |
||
41 | 41 | public function parse($dom, $xpath) |
42 | 42 | { |
43 | 43 | $openingDate = $xpath->query("//span[text()='Openend on:']/following-sibling::strong"); |
44 | - if (! $openingDate || $openingDate->length == 0) { |
|
44 | + if (!$openingDate || $openingDate->length == 0) { |
|
45 | 45 | throw new \UnexpectedValueException('No CfP-Open Date found'); |
46 | 46 | } |
47 | 47 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | { |
51 | 51 | $xpath = new DOMXPath($node->ownerDocument); |
52 | 52 | $closingDate = $xpath->query(".//time/@datetime", $node); |
53 | - if (! $closingDate || $closingDate->length == 0) { |
|
53 | + if (!$closingDate || $closingDate->length == 0) { |
|
54 | 54 | throw new InvalidArgumentException('The CfP does not seem to have a closing date'); |
55 | 55 | } |
56 | 56 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | do { |
67 | 67 | $dom = new DOMDocument('1.0', 'UTF-8'); |
68 | 68 | libxml_use_internal_errors(true); |
69 | - $uri = sprintf($this->uri, $i+1); |
|
69 | + $uri = sprintf($this->uri, $i + 1); |
|
70 | 70 | $dom->loadHTMLFile($uri); |
71 | 71 | libxml_use_internal_errors(false); |
72 | 72 | $dom->preserveWhiteSpace = false; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $xpath = new DOMXPath($dom); |
44 | 44 | $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]"); |
45 | 45 | |
46 | - if (! $titlePath || $titlePath->length == 0) { |
|
46 | + if (!$titlePath || $titlePath->length == 0) { |
|
47 | 47 | return $cfp; |
48 | 48 | } |
49 | 49 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $xpath = new DOMXPath($dom); |
44 | 44 | |
45 | 45 | $tagsPath = $xpath->query("//h1/following-sibling::a/following-sibling::span"); |
46 | - if (! $tagsPath || $tagsPath->length == 0) { |
|
46 | + if (!$tagsPath || $tagsPath->length == 0) { |
|
47 | 47 | throw new \InvalidArgumentException('The CfP does not seem to have tags'); |
48 | 48 | } |
49 | 49 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $xpath = new DOMXPath($dom); |
45 | 45 | $titlePath = $xpath->query("//h1[contains(@class, 'subheader__title')]"); |
46 | 46 | |
47 | - if (! $titlePath || $titlePath->length == 0) { |
|
47 | + if (!$titlePath || $titlePath->length == 0) { |
|
48 | 48 | throw new \InvalidArgumentException('The CfP does not seem to have an eventname'); |
49 | 49 | } |
50 | 50 |
@@ -51,30 +51,30 @@ |
||
51 | 51 | $xpath = new DOMXPath($dom); |
52 | 52 | $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]"); |
53 | 53 | |
54 | - if (! $titlePath || $titlePath->length == 0) { |
|
54 | + if (!$titlePath || $titlePath->length == 0) { |
|
55 | 55 | return $cfp; |
56 | 56 | } |
57 | 57 | |
58 | 58 | $locationTimeString = trim($titlePath->item(0)->textContent); |
59 | 59 | $locationTime = explode(' - ', $locationTimeString); |
60 | 60 | |
61 | - if (! isset($locationTime[1])) { |
|
61 | + if (!isset($locationTime[1])) { |
|
62 | 62 | return $cfp; |
63 | 63 | } |
64 | 64 | |
65 | 65 | $dates = explode(',', $locationTime[1]); |
66 | - if (count($dates) % 2 !== 0) { |
|
66 | + if (count($dates) % 2 !== 0) { |
|
67 | 67 | var_Dump($dates); |
68 | 68 | return $cfp; |
69 | 69 | } |
70 | 70 | |
71 | - $datestring = $dates[0] . ', ' . $dates[1]; |
|
71 | + $datestring = $dates[0].', '.$dates[1]; |
|
72 | 72 | |
73 | 73 | if (count($dates) >= 4) { |
74 | - $datestring = $dates[2] . ', ' . $dates[3]; |
|
74 | + $datestring = $dates[2].', '.$dates[3]; |
|
75 | 75 | } |
76 | 76 | |
77 | - $endDate = new DateTimeImmutable($datestring . ' 00:00:00', $this->timezone ); |
|
77 | + $endDate = new DateTimeImmutable($datestring.' 00:00:00', $this->timezone); |
|
78 | 78 | $cfp->eventEndDate = $endDate; |
79 | 79 | |
80 | 80 | return $cfp; |
@@ -51,19 +51,19 @@ discard block |
||
51 | 51 | $xpath = new DOMXPath($dom); |
52 | 52 | $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]"); |
53 | 53 | |
54 | - if (! $titlePath || $titlePath->length == 0) { |
|
54 | + if (!$titlePath || $titlePath->length == 0) { |
|
55 | 55 | return $cfp; |
56 | 56 | } |
57 | 57 | |
58 | 58 | $location = trim($titlePath->item(0)->textContent); |
59 | 59 | $location = explode(' - ', $location); |
60 | 60 | |
61 | - if (! isset($location[1])) { |
|
61 | + if (!isset($location[1])) { |
|
62 | 62 | return $cfp; |
63 | 63 | } |
64 | 64 | |
65 | 65 | $dates = explode(',', $location[1]); |
66 | - if (count($dates) % 2 !== 0) { |
|
66 | + if (count($dates) % 2 !== 0) { |
|
67 | 67 | return $cfp; |
68 | 68 | } |
69 | 69 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return $cfp; |
72 | 72 | } |
73 | 73 | |
74 | - $startDate = new DateTimeImmutable($dates[0] . ', ' . $dates[1] . ' 00:00:00', $this->timezone ); |
|
74 | + $startDate = new DateTimeImmutable($dates[0].', '.$dates[1].' 00:00:00', $this->timezone); |
|
75 | 75 | $cfp->eventStartDate = $startDate; |
76 | 76 | |
77 | 77 | return $cfp; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $xpath = new DOMXPath($dom); |
44 | 44 | $uriPath = $xpath->query("//h1/following-sibling::a"); |
45 | 45 | |
46 | - if (! $uriPath || $uriPath->length == 0) { |
|
46 | + if (!$uriPath || $uriPath->length == 0) { |
|
47 | 47 | throw new \InvalidArgumentException('The CfP does not seem to have an EventUri'); |
48 | 48 | } |
49 | 49 |