Completed
Pull Request — master (#32)
by Andreas
01:40
created
src/Parser/PapercallIo/Uri.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
         $xpath = new DOMXPath($dom);
44 44
         $titlePath = $xpath->query("//a[starts-with(@href, '/cfps/')]");
45 45
 
46
-        if (! $titlePath || $titlePath->length == 0) {
46
+        if (!$titlePath || $titlePath->length == 0) {
47 47
             throw new \InvalidArgumentException('The CfP does not seem to have a CfP-Uri');
48 48
         }
49 49
 
50
-        $cfp->uri = 'https://papercall.io' . trim($titlePath->item(0)->attributes->getNamedItem('href')->textContent);
50
+        $cfp->uri = 'https://papercall.io'.trim($titlePath->item(0)->attributes->getNamedItem('href')->textContent);
51 51
 
52 52
         return $cfp;
53 53
     }
Please login to merge, or discard this patch.
src/Service/GeolocationService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@
 block discarded – undo
59 59
 
60 60
         $values = json_decode($result->getBody()->getContents(), true);
61 61
 
62
-        if (! isset($values[0])) {
62
+        if (!isset($values[0])) {
63 63
             return new Geolocation(0, 0);
64 64
         }
65 65
 
66
-        if (! isset($values[0]['lat']) || ! isset($values[0]['lon'])) {
66
+        if (!isset($values[0]['lat']) || !isset($values[0]['lon'])) {
67 67
             return new Geolocation(0, 0);
68 68
         }
69 69
 
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
             return $cfp;
48 48
         }
49 49
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/OpeningDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         }
47 47
 
48 48
         $openingDate = $xpath->query("//span[text()='Openend on:']/following-sibling::strong");
49
-        if (! $openingDate || $openingDate->length == 0) {
49
+        if (!$openingDate || $openingDate->length == 0) {
50 50
             throw new \UnexpectedValueException('No CfP-Open Date found');
51 51
         }
52 52
 
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
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         }
55 55
         $xpath = new DOMXPath($node->ownerDocument);
56 56
         $closingDate = $xpath->query(".//time/@datetime", $node);
57
-        if (! $closingDate || $closingDate->length == 0) {
57
+        if (!$closingDate || $closingDate->length == 0) {
58 58
             throw new InvalidArgumentException('The CfP does not seem to have a closing date');
59 59
         }
60 60
 
Please login to merge, or discard this patch.
src/Entity/Geolocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,6 +53,6 @@
 block discarded – undo
53 53
 
54 54
     public function __toString() : string
55 55
     {
56
-        return $this->getLatitude() . ' ' . $this->getLongitude();
56
+        return $this->getLatitude().' '.$this->getLongitude();
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
src/Writer/TestCfpWriter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,15 +60,15 @@
 block discarded – undo
60 60
     {
61 61
         /** @var \Callingallpapers\Entity\Cfp $cfp */
62 62
         foreach ($this->cfps as $cfp) {
63
-            if (! $cfp->uri) {
63
+            if (!$cfp->uri) {
64 64
                 return false;
65 65
             }
66 66
 
67
-            if (! $cfp->conferenceName) {
67
+            if (!$cfp->conferenceName) {
68 68
                 return false;
69 69
             }
70 70
 
71
-            if (! $cfp->dateEnd) {
71
+            if (!$cfp->dateEnd) {
72 72
                 return false;
73 73
             }
74 74
         }
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
@@ -57,29 +57,29 @@
 block discarded – undo
57 57
         $xpath = new DOMXPath($dom);
58 58
         $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]");
59 59
 
60
-        if (! $titlePath || $titlePath->length == 0) {
60
+        if (!$titlePath || $titlePath->length == 0) {
61 61
             return $cfp;
62 62
         }
63 63
 
64 64
         $locationTimeString = trim($titlePath->item(0)->textContent);
65 65
         $locationTime = explode(' - ', $locationTimeString);
66 66
 
67
-        if (! isset($locationTime[1])) {
67
+        if (!isset($locationTime[1])) {
68 68
             return $cfp;
69 69
         }
70 70
 
71 71
         $dates = explode(',', $locationTime[1]);
72
-        if (count($dates) % 2  !== 0) {
72
+        if (count($dates) % 2 !== 0) {
73 73
             return $cfp;
74 74
         }
75 75
 
76
-        $datestring = $dates[0] . ', ' . $dates[1];
76
+        $datestring = $dates[0].', '.$dates[1];
77 77
 
78 78
         if (count($dates) >= 4) {
79
-            $datestring = $dates[2] . ', ' . $dates[3];
79
+            $datestring = $dates[2].', '.$dates[3];
80 80
         }
81 81
 
82
-        $endDate = new DateTimeImmutable($datestring . ' 00:00:00', $timezone);
82
+        $endDate = new DateTimeImmutable($datestring.' 00:00:00', $timezone);
83 83
         $cfp->eventEndDate = $endDate;
84 84
 
85 85
         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
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
56 56
         $xpath = new DOMXPath($dom);
57 57
         $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]");
58 58
 
59
-        if (! $titlePath || $titlePath->length == 0) {
59
+        if (!$titlePath || $titlePath->length == 0) {
60 60
             return $cfp;
61 61
         }
62 62
 
63 63
         $location = trim($titlePath->item(0)->textContent);
64 64
         $location = explode(' - ', $location);
65 65
 
66
-        if (! isset($location[1])) {
66
+        if (!isset($location[1])) {
67 67
             return $cfp;
68 68
         }
69 69
 
70 70
         $dates = explode(',', $location[1]);
71
-        if (count($dates) % 2  !== 0) {
71
+        if (count($dates) % 2 !== 0) {
72 72
             return $cfp;
73 73
         }
74 74
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             return $cfp;
77 77
         }
78 78
 
79
-        $startDate = new DateTimeImmutable($dates[0] . ', ' . $dates[1] . ' 00:00:00', $timezone);
79
+        $startDate = new DateTimeImmutable($dates[0].', '.$dates[1].' 00:00:00', $timezone);
80 80
         $cfp->eventStartDate = $startDate;
81 81
 
82 82
         return $cfp;
Please login to merge, or discard this patch.