Completed
Pull Request — master (#15)
by Andreas
02:25
created
src/Writer/ApiCfpWriter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         try {
83 83
             $this->client->request('GET', sprintf(
84
-                $this->baseUri . '/%1$s',
84
+                $this->baseUri.'/%1$s',
85 85
                 sha1($cfp->conferenceUri)
86 86
             ), []);
87 87
             $exists = true;
@@ -96,18 +96,18 @@  discard block
 block discarded – undo
96 96
                     $this->baseUri
97 97
                 ), [
98 98
                     'headers' => [
99
-                        'Authenticate' => 'Bearer ' . $this->bearerToken,
99
+                        'Authenticate' => 'Bearer '.$this->bearerToken,
100 100
                     ],
101 101
                     'form_params' => $body
102 102
                 ]);
103 103
             } else {
104 104
                 // Exists, so update it
105 105
                 $response = $this->client->request('PUT', sprintf(
106
-                    $this->baseUri . '/%1$s',
106
+                    $this->baseUri.'/%1$s',
107 107
                     sha1($cfp->conferenceUri)
108 108
                 ), [
109 109
                     'headers' => [
110
-                        'Authenticate' => 'Bearer ' . $this->bearerToken,
110
+                        'Authenticate' => 'Bearer '.$this->bearerToken,
111 111
                     ],
112 112
                     'form_params' => $body
113 113
                 ]);
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
         $this->output->writeln(sprintf(
124 124
             'Conference "%1$s" succcessfully %2$s.',
125 125
             $cfp->conferenceName,
126
-            ($exists)?'updated':'created'
126
+            ($exists) ? 'updated' : 'created'
127 127
         ));
128 128
 
129
-        return (isset($response) && ($response->getStatusCode() === 200 || $response->getStatusCode() === 201))?'Success':'Failure';
129
+        return (isset($response) && ($response->getStatusCode() === 200 || $response->getStatusCode() === 201)) ? 'Success' : 'Failure';
130 130
     }
131 131
 
132 132
     public function setOutput(OutputInterface $output)
Please login to merge, or discard this patch.
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.