Passed
Push — main ( b3a018...5357dd )
by PRATIK
04:02
created
src/Models/Admin/Gallery.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
     {
19 19
         parent::boot();
20 20
 
21
-        static::saving(function () {
21
+        static::saving(function() {
22 22
             self::cacheKey();
23 23
         });
24 24
 
25
-        static::deleting(function () {
25
+        static::deleting(function() {
26 26
             self::cacheKey();
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
src/Models/Admin/Client.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
     {
19 19
         parent::boot();
20 20
 
21
-        static::saving(function () {
21
+        static::saving(function() {
22 22
             self::cacheKey();
23 23
         });
24 24
 
25
-        static::deleting(function () {
25
+        static::deleting(function() {
26 26
             self::cacheKey();
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
src/Repositories/TemplateRepository.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
     public function indexTemplate()
14 14
     {
15 15
         $templates = config('adminetic.caching', true)
16
-            ? (Cache::has('templates') ? Cache::get('templates') : Cache::rememberForever('templates', function () {
16
+            ? (Cache::has('templates') ? Cache::get('templates') : Cache::rememberForever('templates', function() {
17 17
                 return Template::latest()->get();
18 18
             }))
19 19
             : Template::latest()->get();
Please login to merge, or discard this patch.
src/Http/Livewire/Admin/Post/PostsTable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -185,11 +185,11 @@
 block discarded – undo
185 185
     {
186 186
         $search = $this->search ?? null;
187 187
         if ($search != '') {
188
-            return Post::where(function ($query) use ($search) {
189
-                $query->where('name', 'LIKE', '%' . $search . '%')
190
-                    ->orWhere('excerpt', 'LIKE', '%' . $search . '%')
191
-                    ->orWhere('seo_name', 'LIKE', '%' . $search . '%')
192
-                    ->orWhere('meta_description', 'LIKE', '%' . $search . '%');
188
+            return Post::where(function($query) use ($search) {
189
+                $query->where('name', 'LIKE', '%'.$search.'%')
190
+                    ->orWhere('excerpt', 'LIKE', '%'.$search.'%')
191
+                    ->orWhere('seo_name', 'LIKE', '%'.$search.'%')
192
+                    ->orWhere('meta_description', 'LIKE', '%'.$search.'%');
193 193
             });
194 194
         } else {
195 195
             return Post::latest();
Please login to merge, or discard this patch.
src/Services/PostRecommendation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $posts = Cache::get('posts', Post::with('category', 'author', 'tagged')->latest()->get());
14 14
 
15
-        return $posts->sortByDesc(function ($p) use ($post) {
15
+        return $posts->sortByDesc(function($p) use ($post) {
16 16
             $post_tags = $post->tags->pluck('name')->toArray();
17 17
             $tag_weight = $p->withAnyTag($post_tags)->exists() ? (5 / 100) * $p->weight : 0;
18 18
             $category_weight = $p->category->id == $post->category_id ? (10 / 100) * $p->weight : 0;
Please login to merge, or discard this patch.
src/Models/Admin/Template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
     {
19 19
         parent::boot();
20 20
 
21
-        static::saving(function () {
21
+        static::saving(function() {
22 22
             self::cacheKey();
23 23
         });
24 24
 
25
-        static::deleting(function () {
25
+        static::deleting(function() {
26 26
             self::cacheKey();
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
src/Models/Admin/Post.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
     {
19 19
         parent::boot();
20 20
 
21
-        static::saving(function () {
21
+        static::saving(function() {
22 22
             self::cacheKey();
23 23
         });
24 24
 
25
-        static::deleting(function () {
25
+        static::deleting(function() {
26 26
             self::cacheKey();
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
database/migrations/2021_10_02_062840_create_posts_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('posts', function (Blueprint $table) {
16
+        Schema::create('posts', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('slug')->unique();
19 19
             $table->string('code')->unique();
Please login to merge, or discard this patch.
database/migrations/2021_10_02_080049_create_templates_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('templates', function (Blueprint $table) {
16
+        Schema::create('templates', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('name');
19 19
             $table->text('template');
Please login to merge, or discard this patch.