Passed
Push — main ( 21b81c...b80092 )
by PRATIK
14:07
created
src/Repositories/FacilityRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public function indexFacility()
15 15
     {
16 16
         $facilities = config('adminetic.caching', true)
17
-            ? (Cache::has('facilities') ? Cache::get('facilities') : Cache::rememberForever('facilities', function () {
17
+            ? (Cache::has('facilities') ? Cache::get('facilities') : Cache::rememberForever('facilities', function() {
18 18
                 return Facility::orderBy('position')->get();
19 19
             }))
20 20
             : Facility::orderBy('position')->get();
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 'icon_image' => request()->icon_image->store('website/facility/image', 'public'),
70 70
             ]);
71 71
             $image = Image::make(request()->file('icon_image')->getRealPath());
72
-            $image->save(public_path('storage/' . $facility->icon_image));
72
+            $image->save(public_path('storage/'.$facility->icon_image));
73 73
         }
74 74
 
75 75
         if (request()->image) {
Please login to merge, or discard this patch.
src/Provider/WebsiteServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
     {
170 170
         // Publish Config File
171 171
         $this->publishes([
172
-            __DIR__ . '/../../config/website.php' => config_path('website.php'),
172
+            __DIR__.'/../../config/website.php' => config_path('website.php'),
173 173
         ], 'website-config');
174 174
         // Publish View Files
175 175
         $this->publishes([
176
-            __DIR__ . '/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'),
176
+            __DIR__.'/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'),
177 177
         ], 'website-views');
178 178
         // Publish Migration Files
179 179
         $this->publishes([
180
-            __DIR__ . '/../../database/migrations' => database_path('migrations/website'),
180
+            __DIR__.'/../../database/migrations' => database_path('migrations/website'),
181 181
         ], 'website-migrations');
182 182
     }
183 183
 
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
     protected function registerResource()
190 190
     {
191 191
         if (!config('website.publish_migrations', true)) {
192
-            $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Loading Migration Files
192
+            $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); // Loading Migration Files
193 193
         }
194
-        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'website'); // Loading Views Files
194
+        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'website'); // Loading Views Files
195 195
         $this->registerRoutes();
196 196
     }
197 197
 
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
      */
218 218
     protected function registerRoutes()
219 219
     {
220
-        Route::group($this->routeConfiguration(), function () {
221
-            $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php');
220
+        Route::group($this->routeConfiguration(), function() {
221
+            $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');
222 222
         });
223 223
     }
224 224
 
Please login to merge, or discard this patch.
database/migrations/2021_11_14_094654_create_popups_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('popups', function (Blueprint $table) {
16
+        Schema::create('popups', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('code')->unique();
19 19
             $table->string('name')->nullable();
Please login to merge, or discard this patch.
src/Repositories/PopupRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public function indexPopup()
15 15
     {
16 16
         $popups = config('adminetic.caching', true)
17
-            ? (Cache::has('popups') ? Cache::get('popups') : Cache::rememberForever('popups', function () {
17
+            ? (Cache::has('popups') ? Cache::get('popups') : Cache::rememberForever('popups', function() {
18 18
                 return Popup::latest()->get();
19 19
             }))
20 20
             : Popup::latest()->get();
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
                 'image' => request()->image->store('website/popup', 'public')
68 68
             ]);
69 69
             if (request()->file('image')->getClientOriginalExtension() == 'gif') {
70
-                $imageName = time() . '.' . request()->image->extension();
70
+                $imageName = time().'.'.request()->image->extension();
71 71
 
72 72
                 request()->image->move(public_path('website/popup'), $imageName);
73 73
             } else {
74 74
                 $image = Image::make(request()->file('image')->getRealPath());
75
-                $image->save(public_path('storage/' . $popup->image));
75
+                $image->save(public_path('storage/'.$popup->image));
76 76
             }
77 77
         }
78 78
     }
Please login to merge, or discard this patch.
src/Http/Requests/PopupRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         $id = $this->popup->id ?? '';
40 40
         return [
41
-            'code' => 'required|unique:popups,code,' . $id,
41
+            'code' => 'required|unique:popups,code,'.$id,
42 42
             'name' => 'nullable|max:255',
43 43
             'image' => 'nullable|file|image|max:3000',
44 44
             'body' => 'nullable|max:5500',
Please login to merge, or discard this patch.
src/Models/Admin/Popup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
     {
18 18
         parent::boot();
19 19
 
20
-        static::saving(function () {
20
+        static::saving(function() {
21 21
             self::cacheKey();
22 22
         });
23 23
 
24
-        static::deleting(function () {
24
+        static::deleting(function() {
25 25
             self::cacheKey();
26 26
         });
27 27
 
28
-        Popup::creating(function ($model) {
28
+        Popup::creating(function($model) {
29 29
             $model->position = Popup::max('position') + 1;
30 30
         });
31 31
     }
Please login to merge, or discard this patch.