Completed
Push — d64 ( 3ef1d3...9de643 )
by Welling
03:34
created
src/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@
 block discarded – undo
38 38
         if (file_exists($path)) {
39 39
             $ext = pathinfo($path, PATHINFO_EXTENSION);
40 40
             $mimeType = mime_content_type($path);
41
-            $attributes['name'] = pathinfo($path, PATHINFO_FILENAME) . '.' . $ext;
41
+            $attributes['name'] = pathinfo($path, PATHINFO_FILENAME).'.'.$ext;
42 42
             $attributes['type'] = $mimeType;
43 43
             $content = file_get_contents($path);
44
-            $base64 = 'data:' . $mimeType . ';base64,' . base64_encode($content);
44
+            $base64 = 'data:'.$mimeType.';base64,'.base64_encode($content);
45 45
             $attributes['data'] = $base64;
46 46
         } else {
47 47
             throw new \Exception('Missing "file" or "data" attribute.');
Please login to merge, or discard this patch.
src/ClientLocal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $tableGateway = $this->getTableGateway($tableName);
199 199
         $data = $this->parseData($tableName, $data);
200 200
 
201
-        foreach($data as $key => $value) {
201
+        foreach ($data as $key => $value) {
202 202
             if ($value instanceof File) {
203 203
                 $data[$key] = $this->parseFile($value);
204 204
             }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $tableGateway = $this->getTableGateway($tableName);
218 218
         $data = $this->parseData($tableName, $data);
219 219
 
220
-        foreach($data as $key => $value) {
220
+        foreach ($data as $key => $value) {
221 221
             if ($value instanceof File) {
222 222
                 $data[$key] = $this->parseFile($value);
223 223
             }
Please login to merge, or discard this patch.
src/AbstractClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     protected function parseData($tableName, array $data)
46 46
     {
47
-        $method = 'parseOn' . StringUtils::underscoreToCamelCase($tableName, true);
47
+        $method = 'parseOn'.StringUtils::underscoreToCamelCase($tableName, true);
48 48
         if (method_exists($this, $method)) {
49 49
             $data = call_user_func_array([$this, $method], [$data]);
50 50
         }
Please login to merge, or discard this patch.
src/ClientFactory.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
         $emitter = new Emitter();
248 248
 
249
-        $emitter->addAction('table.insert.directus_groups', function ($data) {
249
+        $emitter->addAction('table.insert.directus_groups', function($data) {
250 250
             $acl = Bootstrap::get('acl');
251 251
             $zendDb = Bootstrap::get('zendDb');
252 252
             $privilegesTable = new DirectusPrivilegesTableGateway($zendDb, $acl);
@@ -302,32 +302,32 @@  discard block
 block discarded – undo
302 302
                     $thumbnailFilenameParts = explode('.', $row['name']);
303 303
                     $thumbnailExtension = array_pop($thumbnailFilenameParts);
304 304
 
305
-                    $row['url'] = $fileURL . '/' . $row['name'];
305
+                    $row['url'] = $fileURL.'/'.$row['name'];
306 306
                     if (in_array($thumbnailExtension, ['tif', 'tiff', 'psd', 'pdf'])) {
307 307
                         $thumbnailExtension = 'jpg';
308 308
                     }
309 309
 
310
-                    $thumbnailFilename = $row['id'] . '.' . $thumbnailExtension;
311
-                    $row['thumbnail_url'] = $thumbnailURL . '/' . $thumbnailFilename;
310
+                    $thumbnailFilename = $row['id'].'.'.$thumbnailExtension;
311
+                    $row['thumbnail_url'] = $thumbnailURL.'/'.$thumbnailFilename;
312 312
 
313 313
                     // filename-ext-100-100-true.jpg
314 314
                     // @TODO: This should be another hook listener
315 315
                     $row['thumbnail_url'] = null;
316 316
                     $filename = implode('.', $thumbnailFilenameParts);
317 317
                     if ($row['type'] == 'embed/vimeo') {
318
-                        $oldThumbnailFilename = $row['name'] . '-vimeo-220-124-true.jpg';
318
+                        $oldThumbnailFilename = $row['name'].'-vimeo-220-124-true.jpg';
319 319
                     } else {
320
-                        $oldThumbnailFilename = $filename . '-' . $thumbnailExtension . '-160-160-true.jpg';
320
+                        $oldThumbnailFilename = $filename.'-'.$thumbnailExtension.'-160-160-true.jpg';
321 321
                     }
322 322
 
323 323
                     // 314551321-vimeo-220-124-true.jpg
324 324
                     // hotfix: there's not thumbnail for this file
325
-                    if ($files->exists('thumbs/' . $oldThumbnailFilename)) {
326
-                        $row['thumbnail_url'] = $thumbnailURL . '/' . $oldThumbnailFilename;
325
+                    if ($files->exists('thumbs/'.$oldThumbnailFilename)) {
326
+                        $row['thumbnail_url'] = $thumbnailURL.'/'.$oldThumbnailFilename;
327 327
                     }
328 328
 
329
-                    if ($files->exists('thumbs/' . $thumbnailFilename)) {
330
-                        $row['thumbnail_url'] = $thumbnailURL . '/' . $thumbnailFilename;
329
+                    if ($files->exists('thumbs/'.$thumbnailFilename)) {
330
+                        $row['thumbnail_url'] = $thumbnailURL.'/'.$thumbnailFilename;
331 331
                     }
332 332
 
333 333
                     /*
Please login to merge, or discard this patch.