Completed
Branch master (432117)
by Eliurkis
03:28
created
Category
src/Eliurkis/laravelcdn/CdnServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
 
96 96
         // register the commands:
97 97
         //-----------------------
98
-        $this->app->singleton('cdn.push', function ($app) {
98
+        $this->app->singleton('cdn.push', function($app) {
99 99
             return $app->make('Eliurkis\laravelcdn\Commands\PushCommand');
100 100
         });
101 101
 
102 102
         $this->commands('cdn.push');
103 103
 
104
-        $this->app->singleton('cdn.empty', function ($app) {
104
+        $this->app->singleton('cdn.empty', function($app) {
105 105
             return $app->make('Eliurkis\laravelcdn\Commands\EmptyCommand');
106 106
         });
107 107
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         //-----------------
112 112
 
113 113
         // Register 'CdnFacade' instance container to our CdnFacade object
114
-        $this->app->singleton('CDN', function ($app) {
114
+        $this->app->singleton('CDN', function($app) {
115 115
             return $app->make('Eliurkis\laravelcdn\CdnFacade');
116 116
         });
117 117
 
Please login to merge, or discard this patch.
src/Eliurkis/laravelcdn/CdnFacade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
         if (is_null($manifest)) {
149 149
             $manifest = json_decode(file_get_contents(public_path('mix-manifest.json')), true);
150 150
         }
151
-        if (isset($manifest['/' . $path])) {
152
-            return $this->generateUrl($manifest['/' . $path], 'public/');
151
+        if (isset($manifest['/'.$path])) {
152
+            return $this->generateUrl($manifest['/'.$path], 'public/');
153 153
         }
154 154
         if (isset($manifest[$path])) {
155 155
             return $this->generateUrl($manifest[$path], 'public/');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             $manifest = json_decode(file_get_contents(public_path('build/rev-manifest.json')), true);
176 176
         }
177 177
         if (isset($manifest[$path])) {
178
-            return $this->generateUrl('build/' . $manifest[$path], 'public/');
178
+            return $this->generateUrl('build/'.$manifest[$path], 'public/');
179 179
         }
180 180
         throw new \InvalidArgumentException("File {$path} not defined in asset manifest.");
181 181
     }
Please login to merge, or discard this patch.
src/Eliurkis/laravelcdn/Providers/AwsS3Provider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                         // the bucket name
185 185
                         'Bucket' => $this->getBucket(),
186 186
                         // the path of the file on the server (CDN)
187
-                        'Key' => $this->supplier['upload_folder'] . str_replace('\\', '/', $file->getPathName()),
187
+                        'Key' => $this->supplier['upload_folder'].str_replace('\\', '/', $file->getPathName()),
188 188
                         // the path of the path locally
189 189
                         'Body' => fopen($file->getRealPath(), 'r'),
190 190
                         // the permission of the file
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
             $filesOnAWS->put($file['Key'], $a);
275 275
         }
276 276
 
277
-        $assets->transform(function ($item, $key) use (&$filesOnAWS) {
277
+        $assets->transform(function($item, $key) use (&$filesOnAWS) {
278 278
             $fileOnAWS = $filesOnAWS->get(str_replace('\\', '/', $item->getPathName()));
279 279
 
280 280
             //select to upload files that are different in size AND last modified time.
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             }
284 284
         });
285 285
 
286
-        $assets = $assets->reject(function ($item) {
286
+        $assets = $assets->reject(function($item) {
287 287
             return $item === null;
288 288
         });
289 289
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         if ($this->getCloudFront() === true) {
370 370
             $url = $this->cdn_helper->parseUrl($this->getCloudFrontUrl());
371 371
 
372
-            return $url['scheme'] . '://' . $url['host'] . '/' . $path;
372
+            return $url['scheme'].'://'.$url['host'].'/'.$path;
373 373
         }
374 374
 
375 375
         $url = $this->cdn_helper->parseUrl($this->getUrl());
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         $bucket = $this->getBucket();
378 378
         $bucket = (!empty($bucket)) ? $bucket.'.' : '';
379 379
 
380
-        return $url['scheme'] . '://' . $bucket . $url['host'] . '/' . $path;
380
+        return $url['scheme'].'://'.$bucket.$url['host'].'/'.$path;
381 381
     }
382 382
 
383 383
     /**
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
      */
406 406
     public function getUrl()
407 407
     {
408
-        return rtrim($this->provider_url, '/') . '/';
408
+        return rtrim($this->provider_url, '/').'/';
409 409
     }
410 410
 
411 411
     /**
Please login to merge, or discard this patch.