Completed
Push — master ( ac5d9d...7a8d8f )
by Andreas
01:40
created
src/Middleware/NotifyGoogleAnalytics.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 block discarded – undo
60 60
         $response = $next($request, $response);
61 61
 
62 62
         $this->analytics
63
-             ->setEventCategory($request->getUri()->getPath())
64
-             ->setEventAction($request->getMethod())
65
-             ->setEventLabel('type')
66
-             ->setEventValue($response->getHeader('Content-Type')[0])
67
-             ->setIpOverride($request->getAttribute('ip_address'))
68
-             ->setUserAgentOverride($request->getHeader('User-Agent')[0])
69
-             ->sendEvent();
63
+                ->setEventCategory($request->getUri()->getPath())
64
+                ->setEventAction($request->getMethod())
65
+                ->setEventLabel('type')
66
+                ->setEventValue($response->getHeader('Content-Type')[0])
67
+                ->setIpOverride($request->getAttribute('ip_address'))
68
+                ->setUserAgentOverride($request->getHeader('User-Agent')[0])
69
+                ->sendEvent();
70 70
 
71 71
         return $response;
72 72
     }
Please login to merge, or discard this patch.
src/Entity/CfpListMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                 'sources'        => array_values(array_filter(array_unique($cfp->getSource()))),
54 54
                 'lastChange'     => $cfp->getLastUdated()->format('c'),
55 55
                 '_rel'            => [
56
-                    'cfp_uri'    => 'v1/cfp/' . $cfp->getHash(),
56
+                    'cfp_uri'    => 'v1/cfp/'.$cfp->getHash(),
57 57
                 ]
58 58
             ];
59 59
 
Please login to merge, or discard this patch.
src/Middleware/Renderer.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
             $container['view'] = new RssRenderer();
67 67
         } elseif (strpos($accept[0], 'text/html') !== false) {
68 68
             $container         = $this->app->getContainer();
69
-            $container['view'] = function ($container) {
69
+            $container['view'] = function($container) {
70 70
                 $config = $container['settings'];
71 71
                 $tView  = new \Slim\Views\Twig($config['renderer']['template_path'],
72 72
                     [
Please login to merge, or discard this patch.
src/Service/CfpFactory.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $missingFields = [];
52 52
 
53 53
         foreach ($requiredFields as $field) {
54
-            if (! isset($params[$field])) {
54
+            if (!isset($params[$field])) {
55 55
                 $missingFields[] = $field;
56 56
             }
57 57
         }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
     public static function setName(Cfp $cfp, array $array)
86 86
     {
87
-        if (! isset($array['name'])) {
87
+        if (!isset($array['name'])) {
88 88
             throw new \InvalidArgumentException('Name has to be specified');
89 89
         }
90 90
         $cfp->setName(filter_var($array['name'], FILTER_SANITIZE_STRING));
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public static function setDateCfpStart(Cfp $cfp, array $array)
94 94
     {
95
-        if (! isset($array['dateCfpStart'])) {
95
+        if (!isset($array['dateCfpStart'])) {
96 96
             $array['dateCfpStart'] = '@0';
97 97
         }
98 98
         $cfp->setDateCfpStart(new DateTimeImmutable($array['dateCfpStart']));
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
     public static function setDateCfpEnd(Cfp $cfp, array $array)
102 102
     {
103
-        if (! isset($array['dateCfpEnd'])) {
103
+        if (!isset($array['dateCfpEnd'])) {
104 104
             throw new \InvalidArgumentException('CFP-EndDate has to be specified');
105 105
         }
106 106
         $cfp->setDateCfpEnd(new DateTimeImmutable($array['dateCfpEnd']));
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     public static function setTimezone(Cfp $cfp, array $array)
110 110
     {
111
-        if (! isset($array['timezone'])) {
111
+        if (!isset($array['timezone'])) {
112 112
             throw new \InvalidArgumentException('Timezone has to be specified');
113 113
         }
114 114
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
     public static function setUri(Cfp $cfp, array $array)
123 123
     {
124
-        if (! isset($array['uri'])) {
124
+        if (!isset($array['uri'])) {
125 125
             throw new \InvalidArgumentException('URI has to be specified');
126 126
         }
127 127
 
@@ -130,19 +130,19 @@  discard block
 block discarded – undo
130 130
 
131 131
     public static function setEventUri(Cfp $cfp, array $array, Client $client)
132 132
     {
133
-        if (! isset($array['eventUri'])) {
133
+        if (!isset($array['eventUri'])) {
134 134
             throw new \InvalidArgumentException('Event-URI has to be specified');
135 135
         }
136 136
 
137 137
         try {
138 138
             $uri = '';
139 139
             $client->get($array['eventUri'], [
140
-                'on_stats' => function (TransferStats $stats) use (&$uri) {
140
+                'on_stats' => function(TransferStats $stats) use (&$uri) {
141 141
                     $uri = $stats->getEffectiveUri();
142 142
                 }
143 143
             ]);
144 144
         } catch (\Exception $e) {
145
-            throw new \InvalidArgumentException('Event-URI could not be verified: ' . $e->getMessage());
145
+            throw new \InvalidArgumentException('Event-URI could not be verified: '.$e->getMessage());
146 146
         }
147 147
 
148 148
         $cfp->setEventUri(filter_var($uri, FILTER_VALIDATE_URL));
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
     public static function setIconUri(Cfp $cfp, array $array)
170 170
     {
171
-        if (! isset($array['iconUri'])) {
171
+        if (!isset($array['iconUri'])) {
172 172
             return;
173 173
         }
174 174
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
     public static function setDescription(Cfp $cfp, array $array)
179 179
     {
180
-        if (! isset($array['description'])) {
180
+        if (!isset($array['description'])) {
181 181
             return;
182 182
         }
183 183
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
     public static function setLocation(Cfp $cfp, array $array)
188 188
     {
189
-        if (! isset($array['location'])) {
189
+        if (!isset($array['location'])) {
190 190
             return;
191 191
         }
192 192
 
@@ -195,15 +195,15 @@  discard block
 block discarded – undo
195 195
 
196 196
     public static function setGeolocation(Cfp $cfp, array $array)
197 197
     {
198
-        if (! isset($array['latitude'])) {
198
+        if (!isset($array['latitude'])) {
199 199
             return;
200 200
         }
201 201
 
202
-        if (! isset($array['longitude'])) {
202
+        if (!isset($array['longitude'])) {
203 203
             return;
204 204
         }
205 205
 
206
-        $latitude  = filter_var(
206
+        $latitude = filter_var(
207 207
             $array['latitude'],
208 208
             FILTER_SANITIZE_NUMBER_FLOAT,
209 209
             FILTER_FLAG_ALLOW_FRACTION
@@ -236,18 +236,18 @@  discard block
 block discarded – undo
236 236
 
237 237
     public static function setTags(Cfp $cfp, array $array)
238 238
     {
239
-        if (! isset($array['tags'])) {
239
+        if (!isset($array['tags'])) {
240 240
             return;
241 241
         }
242 242
 
243
-        $cfp->setTags(array_map(function ($item) {
243
+        $cfp->setTags(array_map(function($item) {
244 244
             return filter_var($item, FILTER_SANITIZE_STRING);
245 245
         }, $array['tags']));
246 246
     }
247 247
 
248 248
     public static function setSource(Cfp $cfp, array $array)
249 249
     {
250
-        if (! isset($array['source'])) {
250
+        if (!isset($array['source'])) {
251 251
             return;
252 252
         }
253 253
 
Please login to merge, or discard this patch.