Completed
Pull Request — master (#17)
by Andreas
04:27
created
src/Parser/JoindinCfpParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
         $content = json_decode($content, true);
48 48
 
49 49
         foreach ($content['events'] as $event) {
50
-            if (! $event['cfp_url']) {
50
+            if (!$event['cfp_url']) {
51 51
                 continue;
52 52
             }
53 53
             $info = new Cfp();
54 54
             $info->conferenceName = $event['name'];
55 55
             $info->conferenceUri = $event['href'];
56 56
             if ($event['icon']) {
57
-                $info->iconUri = 'https://joind.in/inc/img/event_icons/' . $event['icon'];
57
+                $info->iconUri = 'https://joind.in/inc/img/event_icons/'.$event['icon'];
58 58
             }
59 59
             $info->eventEndDate = new \DateTimeImmutable($event['end_date']);
60 60
             $info->eventStartDate = new \DateTimeImmutable($event['start_date']);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $info->longitude = $event['longitude'];
67 67
             $info->tags = $event['tags'];
68 68
             $info->uri = $event['cfp_url'];
69
-            $info->timezone = $event['tz_continent'] . '/' . $event['tz_place'];
69
+            $info->timezone = $event['tz_continent'].'/'.$event['tz_place'];
70 70
 
71 71
             $writer->write($info, 'joind.in');
72 72
         }
Please login to merge, or discard this patch.
src/Parser/Lanyrd/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/Command/ParseEvents.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@
 block discarded – undo
67 67
 
68 68
         $start = new \DateTime($input->getOption('start'));
69 69
 
70
-        if (! $start instanceof \DateTime) {
70
+        if (!$start instanceof \DateTime) {
71 71
             throw new \InvalidArgumentException('The given date could not be parsed');
72 72
         }
73 73
 
74
-        $config = parse_ini_file(__DIR__ . '/../../config/callingallpapers.ini');
74
+        $config = parse_ini_file(__DIR__.'/../../config/callingallpapers.ini');
75 75
         $writer = new ApiCfpWriter($config['event_api_url'], $config['event_api_token']);
76 76
         $writer->setOutput($output);
77 77
 
Please login to merge, or discard this patch.
src/Service/WriterFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 class WriterFactory
31 31
 {
32
-    public $configFile = __DIR__ . '/../../config/callingallpapers.ini';
32
+    public $configFile = __DIR__.'/../../config/callingallpapers.ini';
33 33
 
34 34
     public function getWriter()
35 35
     {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             throw new UnknownWriterException('The requested writer could not be created');
43 43
         }
44 44
         
45
-        if (! $writer instanceof WriterInterface) {
45
+        if (!$writer instanceof WriterInterface) {
46 46
             throw new InvalidWriterException('The requested writer is not of the expected type');
47 47
         }
48 48
 
Please login to merge, or discard this patch.
src/Service/TimezoneService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
         $values = json_decode($result->getBody()->getContents(), true);
65 65
 
66
-        if (! isset($values['status']) || $values['status'] !== 'OK') {
66
+        if (!isset($values['status']) || $values['status'] !== 'OK') {
67 67
             return 'UTC';
68 68
         }
69 69
 
Please login to merge, or discard this patch.
src/Parser/Lanyrd/Entry.php 1 patch
Spacing   +5 added lines, -5 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';
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $openingDateParser = new OpeningDate($timezone);
89 89
             try {
90 90
                 $cfp->dateStart = $openingDateParser->parse($dom, $xpath);
91
-            } catch (\Exception $e){}
91
+            } catch (\Exception $e) {}
92 92
 
93 93
             $cfpUriParser = new Uri();
94 94
             $cfp->uri = $cfpUriParser->parse($dom, $xpath);
@@ -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.