Completed
Pull Request — master (#28)
by Andreas
01:52
created
src/Parser/PapercallIo/OpeningDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/ClosingDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Parser/PapercallIoParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Parser/PapercallIo/Location.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/Tags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/EventName.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/EventEndDate.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,30 +51,30 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Parser/PapercallIo/EventStartDate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,19 +51,19 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Parser/PapercallIo/EventUri.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.