Passed
Push — main ( b3a018...5357dd )
by PRATIK
04:02
created
src/Repositories/PopupRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 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();
Please login to merge, or discard this patch.
src/Provider/WebsiteServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -175,15 +175,15 @@  discard block
 block discarded – undo
175 175
     {
176 176
         // Publish Config File
177 177
         $this->publishes([
178
-            __DIR__ . '/../../config/website.php' => config_path('website.php'),
178
+            __DIR__.'/../../config/website.php' => config_path('website.php'),
179 179
         ], 'website-config');
180 180
         // Publish View Files
181 181
         $this->publishes([
182
-            __DIR__ . '/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'),
182
+            __DIR__.'/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'),
183 183
         ], 'website-views');
184 184
         // Publish Migration Files
185 185
         $this->publishes([
186
-            __DIR__ . '/../../database/migrations' => database_path('migrations/website'),
186
+            __DIR__.'/../../database/migrations' => database_path('migrations/website'),
187 187
         ], 'website-migrations');
188 188
     }
189 189
 
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
     protected function registerResource()
196 196
     {
197 197
         if (!config('website.publish_migrations', true)) {
198
-            $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Loading Migration Files
198
+            $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); // Loading Migration Files
199 199
         }
200
-        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'website'); // Loading Views Files
200
+        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'website'); // Loading Views Files
201 201
         $this->registerRoutes();
202 202
     }
203 203
 
@@ -223,13 +223,13 @@  discard block
 block discarded – undo
223 223
      */
224 224
     protected function registerRoutes()
225 225
     {
226
-        Route::group($this->routeConfiguration(), function () {
227
-            $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php');
226
+        Route::group($this->routeConfiguration(), function() {
227
+            $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');
228 228
         });
229 229
 
230 230
         if (config('website.website_api_end_points', true)) {
231
-            Route::group($this->apiRouteConfiguration(), function () {
232
-                $this->loadRoutesFrom(__DIR__ . '/../../routes/api.php');
231
+            Route::group($this->apiRouteConfiguration(), function() {
232
+                $this->loadRoutesFrom(__DIR__.'/../../routes/api.php');
233 233
             });
234 234
         }
235 235
     }
Please login to merge, or discard this patch.
routes/api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 use Illuminate\Support\Facades\Route;
39 39
 
40 40
 if (config('website.website_client_api_end_points', true)) {
41
-    Route::prefix(config('website.client_api_prefix', 'client'))->group(function () {
41
+    Route::prefix(config('website.client_api_prefix', 'client'))->group(function() {
42 42
         Route::get('client', [ClientClientAPIController::class, 'index']);
43 43
         Route::get('client/{client}', [ClientClientAPIController::class, 'show']);
44 44
         Route::get('counter', [CounterClientAPIController::class, 'index']);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 }
78 78
 
79 79
 if (config('website.website_restful_api_end_points', true)) {
80
-    Route::group(['prefix' => config('website.rest_api_prefix', 'rest'), 'middleware' => ['auth:api']], function () {
80
+    Route::group(['prefix' => config('website.rest_api_prefix', 'rest'), 'middleware' => ['auth:api']], function() {
81 81
         Route::resource('client', ClientRestAPIController::class);
82 82
         Route::resource('counter', CounterRestAPIController::class);
83 83
         Route::resource('event', EventRestAPIController::class);
Please login to merge, or discard this patch.
database/migrations/2021_06_28_151336_creates_categorizables_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('categorizables', function (Blueprint $table) {
16
+        Schema::create('categorizables', function(Blueprint $table) {
17 17
             $table->unsignedBigInteger('category_id');
18 18
             $table->unsignedBigInteger('categorizable_id');
19 19
             $table->string('categorizable_type');
Please login to merge, or discard this patch.
database/migrations/2021_06_28_150320_create_categories_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('categories', function (Blueprint $table) {
16
+        Schema::create('categories', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('model');
19 19
             $table->string('code')->unique();
Please login to merge, or discard this patch.
src/Models/Admin/Category.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@
 block discarded – undo
20 20
     {
21 21
         parent::boot();
22 22
 
23
-        static::saving(function () {
23
+        static::saving(function() {
24 24
             self::cacheKey();
25 25
         });
26 26
 
27
-        static::deleting(function () {
27
+        static::deleting(function() {
28 28
             self::cacheKey();
29 29
         });
30 30
 
31
-        Category::creating(function ($model) {
31
+        Category::creating(function($model) {
32 32
             $model->position = Category::max('position') + 1;
33 33
         });
34 34
     }
Please login to merge, or discard this patch.
src/Console/Commands/AdmineticWebsiteInstallCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     {
72 72
         $traitTemplate = file_get_contents(__DIR__.'/../../Console/Stubs/CategoryMorphedByMany.stub');
73 73
 
74
-        if (! file_exists($path = app_path('Traits'))) {
74
+        if (!file_exists($path = app_path('Traits'))) {
75 75
             mkdir($path, 0777, true);
76 76
         }
77 77
 
Please login to merge, or discard this patch.
src/Http/Requests/CategoryRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
 
45 45
         return [
46 46
             'model' => 'required|max:255',
47
-            'code' => 'required|unique:categories,code,' . $id,
47
+            'code' => 'required|unique:categories,code,'.$id,
48 48
             'name' => 'required|max:255',
49
-            'slug' => 'required|unique:categories,slug,' . $id,
49
+            'slug' => 'required|unique:categories,slug,'.$id,
50 50
             'parent_id' => 'nullable|numeric',
51 51
             'main_category_id' => 'nullable|numeric',
52 52
             'active' => 'sometimes|boolean',
Please login to merge, or discard this patch.
src/Http/Livewire/Admin/Category/QuickCategory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
     public function render()
42 42
     {
43
-        $parentcategories = Category::whereNull('parent_id')->where(function ($q) {
43
+        $parentcategories = Category::whereNull('parent_id')->where(function($q) {
44 44
             return $q->where('model', $this->model)->orWhere('model', 'All');
45 45
         })->with('childrenCategories')->get();
46 46
         return view('website::livewire.admin.category.quick-category', compact('parentcategories'));
Please login to merge, or discard this patch.