Completed
Push — master ( 804e02...f8cc84 )
by Davide
03:49
created
src/ResponsiveGalleryServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             __DIR__.'/../config/responsive-gallery.php' => base_path('config/responsive-gallery.php'),
22 22
         ], 'config');
23 23
 
24
-        if (! class_exists('CreateGalleryImagesTable')) {
24
+        if (!class_exists('CreateGalleryImagesTable')) {
25 25
             $this->publishes([
26 26
                 __DIR__.'/../database/migrations/create_gallery_images_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_gallery_images_table.php'),
27 27
             ], 'migrations');
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             __DIR__.'/../resources/views' => resource_path('views/vendor/laravel-responsive-gallery/'),
33 33
         ]);
34 34
 
35
-        Route::group(['middleware' => 'web'], function () {
35
+        Route::group(['middleware' => 'web'], function() {
36 36
             Route::resource('responsive-gallery', ResponsiveGalleryController::class);
37 37
         });
38 38
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $this->mergeConfigFrom(__DIR__.'/../config/responsive-gallery.php', 'responsive-gallery');
43 43
 
44
-        $this->app->bind('gallery-index', function () {
44
+        $this->app->bind('gallery-index', function() {
45 45
             return new ResponsiveGalleryFactory();
46 46
         });
47 47
     }
Please login to merge, or discard this patch.
src/ResponsiveGalleryFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $thumbs_height = $thumbs_size['height'];
97 97
 
98 98
         //  Create thumbs dir
99
-        if (! is_dir($thumbs_dir)) {
99
+        if (!is_dir($thumbs_dir)) {
100 100
             mkdir($thumbs_dir);
101 101
         }
102 102
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             foreach ($image_files as $index=>$file) {
107 107
                 $index++;
108 108
                 $thumbnail_image = $thumbs_dir.$file;
109
-                if (! file_exists($thumbnail_image)) {
109
+                if (!file_exists($thumbnail_image)) {
110 110
                     $extension = self::get_file_extension($thumbnail_image);
111 111
                     if ($extension) {
112 112
                         $this->generate_single_thumb_file($images_dir.$file, $thumbnail_image, $thumbs_width, $thumbs_height);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      **/
128 128
     public function createImagesArray($image_file_names, $gallery_url, $dbImageDatas)
129 129
     {
130
-        sort($image_file_names);  // Order by image name
130
+        sort($image_file_names); // Order by image name
131 131
 
132 132
         $ret = [];
133 133
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             $ret[$k]['alt'] = '';
140 140
             $ret[$k]['video_link'] = null;
141 141
 
142
-            if (! empty($dbImageDatas[$image_file_name])) {
142
+            if (!empty($dbImageDatas[$image_file_name])) {
143 143
                 $ret[$k]['description'] = $dbImageDatas[$image_file_name]->description;
144 144
                 $ret[$k]['alt'] = $dbImageDatas[$image_file_name]->alt;
145 145
                 $ret[$k]['video_link'] = $dbImageDatas[$image_file_name]->video_link;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 // Get images file name array
289 289
                 $image_files = $this->getImageFiles($parameters['images_dir']);
290 290
 
291
-                if (! empty($image_files)) {
291
+                if (!empty($image_files)) {
292 292
                     $this->generateThumbs($parameters['images_dir'], $parameters['thumbs_dir'], $parameters['thumbs_size'], $image_files);
293 293
                     $dbImageDatas = $this->getPhotoDatasFromDb();
294 294
 
Please login to merge, or discard this patch.