Completed
Pull Request — master (#28)
by Andreas
02:06
created
src/Parser/PapercallIo/LanyrdCfpParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         do {
48 48
             $dom = new \DOMDocument('1.0', 'UTF-8');
49
-            $dom->loadHTMLFile($uri . '?page=' . ($i+1));
49
+            $dom->loadHTMLFile($uri.'?page='.($i + 1));
50 50
             $dom->preserveWhiteSpace = false;
51 51
 
52 52
             $xpath = new \DOMXPath($dom);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
                     $eventPageUrl = $links->item(0)->attributes->getNamedItem('href')->textContent;
79 79
                     error_log($eventPageUrl);
80
-                    if (! $eventPageUrl) {
80
+                    if (!$eventPageUrl) {
81 81
                         continue;
82 82
                     }
83 83
                     $writer->write($lanyrdEntryParser->parse($eventPageUrl), 'lanyrd.com');
Please login to merge, or discard this patch.
src/Parser/PapercallIo/Entry.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
             $content = file_Get_contents($uri);
58 58
             $content = mb_convert_encoding($content, 'UTF-8');
59
-            $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>' . $content);
59
+            $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>'.$content);
60 60
             $dom->preserveWhiteSpace = false;
61 61
 
62 62
             $timezone = 'UTC';
@@ -154,15 +154,15 @@  discard block
 block discarded – undo
154 154
     {
155 155
         $confPath = $xpath->query("//h3/a[contains(@class, 'summary')]");
156 156
 
157
-        if (! $confPath || $confPath->length == 0) {
157
+        if (!$confPath || $confPath->length == 0) {
158 158
             throw new \InvalidArgumentException('We can\'t find an EventPage');
159 159
         }
160 160
 
161 161
         $dom = new \DOMDocument('1.0', 'UTF-8');
162 162
 
163
-        $content = file_get_contents('https://lanyrd.com' . $confPath->item(0)->attributes->getNamedItem('href')->textContent);
163
+        $content = file_get_contents('https://lanyrd.com'.$confPath->item(0)->attributes->getNamedItem('href')->textContent);
164 164
         $content = mb_convert_encoding($content, 'UTF-8');
165
-        $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>' . $content);
165
+        $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>'.$content);
166 166
         $dom->preserveWhiteSpace = false;
167 167
 
168 168
         return $dom;
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
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         $confPath = $xpath->query("//h3/a[contains(@class, 'summary')]");
38 38
 
39
-        if (! $confPath || $confPath->length == 0) {
39
+        if (!$confPath || $confPath->length == 0) {
40 40
             throw new \InvalidArgumentException('The CfP does not seem to have an eventname');
41 41
         }
42 42
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/EventStartDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function parse($dom, $xpath)
36 36
     {
37 37
         $startDate = $xpath->query("//div[contains(@class, 'vevent')]/*/abbr[contains(@class, 'dtstart')]"); ///a/abbr[class='dtstart']
38
-        if (! $startDate || $startDate->length == 0) {
38
+        if (!$startDate || $startDate->length == 0) {
39 39
             throw new \InvalidArgumentException('The Event does not seem to have a start date');
40 40
         }
41 41
 
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
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $tags = $xpath->query(
38 38
             "//ul[contains(@class, \"tags\")]/li/a"
39 39
         );
40
-        if (! $tags || $tags->length == 0) {
40
+        if (!$tags || $tags->length == 0) {
41 41
             throw new \InvalidArgumentException('The CfP does not seem to have tags');
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/Uri.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $uri = $xpath->query(
38 38
             "//strong[contains(@class, \"call-open\")]/following-sibling::a"
39 39
         );
40
-        if (! $uri || $uri->length == 0) {
40
+        if (!$uri || $uri->length == 0) {
41 41
             throw new \InvalidArgumentException('The CfP does not seem to have a CfP-Uri');
42 42
         }
43 43
 
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
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         $uriPath = $xpath->query("//a[contains(@title, 'visit their website')]");
38 38
 
39
-        if (! $uriPath || $uriPath->length == 0) {
39
+        if (!$uriPath || $uriPath->length == 0) {
40 40
             throw new \InvalidArgumentException('The CfP does not seem to have an EventUri');
41 41
         }
42 42
 
Please login to merge, or discard this patch.
src/Parser/PapercallIo/EventEndDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function parse($dom, $xpath)
36 36
     {
37 37
         $endDate = $xpath->query("//div[contains(@class, 'vevent')]/*/abbr[contains(@class, 'dtend')]"); ///a/abbr[class='dtstart']
38
-        if (! $endDate || $endDate->length == 0) {
38
+        if (!$endDate || $endDate->length == 0) {
39 39
             throw new \InvalidArgumentException('The Event does not seem to have an end date');
40 40
         }
41 41
 
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
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function parse($dom, $xpath)
36 36
     {
37 37
         $locations = $xpath->query("//div[contains(@class, 'vevent')]/p[contains(@class, 'location')]/a"); ///a/abbr[class='dtstart']
38
-        if (! $locations || $locations->length == 0) {
38
+        if (!$locations || $locations->length == 0) {
39 39
             throw new \InvalidArgumentException('The Event does not seem to have an end date');
40 40
         }
41 41
         $location = [];
Please login to merge, or discard this patch.