Passed
Push — main ( 7a01df...251215 )
by PRATIK
09:52 queued 05:40
created
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.
src/Repositories/PostRepository.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,34 +14,34 @@
 block discarded – undo
14 14
     // Post Index
15 15
     public function indexPost()
16 16
     {
17
-        Cache::rememberForever('posts', function () {
17
+        Cache::rememberForever('posts', function() {
18 18
             return Post::with('author')->latest()->get();
19 19
         });
20
-        Cache::rememberForever('latest_limited_posts', function () {
20
+        Cache::rememberForever('latest_limited_posts', function() {
21 21
             return Post::latestLimitedPosts()->get();
22 22
         });
23
-        Cache::rememberForever('featured_limited_posts', function () {
23
+        Cache::rememberForever('featured_limited_posts', function() {
24 24
             return Post::featuredLimitedPosts()->get();
25 25
         });
26
-        Cache::rememberForever('limited_breaking_news', function () {
26
+        Cache::rememberForever('limited_breaking_news', function() {
27 27
             return Post::limitedBreakingNews()->get();
28 28
         });
29
-        Cache::rememberForever('limited_hot_news', function () {
29
+        Cache::rememberForever('limited_hot_news', function() {
30 30
             return Post::limitedHotNews()->get();
31 31
         });
32
-        Cache::rememberForever('limited_trending_posts', function () {
32
+        Cache::rememberForever('limited_trending_posts', function() {
33 33
             return Post::trending();
34 34
         });
35
-        Cache::rememberForever('limited_priority_posts', function () {
35
+        Cache::rememberForever('limited_priority_posts', function() {
36 36
             return Post::limitedPriorityPosts()->get();
37 37
         });
38
-        Cache::rememberForever('yesterday_most_visited_posts', function () {
38
+        Cache::rememberForever('yesterday_most_visited_posts', function() {
39 39
             return Post::yesterdayMostVisitedPosts()->get();
40 40
         });
41
-        Cache::rememberForever('week_most_visited_posts', function () {
41
+        Cache::rememberForever('week_most_visited_posts', function() {
42 42
             return Post::weekMostVisitedPosts()->get();
43 43
         });
44
-        Cache::rememberForever('most_visited_posts_chunked', function () {
44
+        Cache::rememberForever('most_visited_posts_chunked', function() {
45 45
             return Post::mostVisitedPostsChunked();
46 46
         });
47 47
 
Please login to merge, or discard this patch.
src/Traits/PostTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     public function scopeTenent($query)
11 11
     {
12 12
         if (Auth::user()->exists()) {
13
-            if (! Auth::user()->hasRole('superadmin') || ! Auth::user()->hasRole('admin')) {
13
+            if (!Auth::user()->hasRole('superadmin') || !Auth::user()->hasRole('admin')) {
14 14
                 return $query->where('author_id', Auth::user()->id);
15 15
             } else {
16 16
                 return $query->whereNotNull('id');
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
     public function scopeTrending($query, $limit = 12)
106 106
     {
107
-        return $query->with('author', 'tagged')->published()->get()->sortByDesc(function ($p) {
107
+        return $query->with('author', 'tagged')->published()->get()->sortByDesc(function($p) {
108 108
             return $p->weight;
109 109
         })->take($limit);
110 110
     }
Please login to merge, or discard this patch.
src/Http/Livewire/Admin/Post/PostsTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
195 195
     {
196 196
         $search = $this->search ?? null;
197 197
         if ($search != '') {
198
-            return Post::where(function ($query) use ($search) {
198
+            return Post::where(function($query) use ($search) {
199 199
                 $query->where('name', 'LIKE', '%'.$search.'%')
200 200
                     ->orWhere('excerpt', 'LIKE', '%'.$search.'%')
201 201
                     ->orWhere('seo_name', 'LIKE', '%'.$search.'%')
Please login to merge, or discard this patch.
src/Http/Livewire/Admin/Post/PostFeatured.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 featuredChanged(Post $post)
15 15
     {
16 16
         $post->update([
17
-            'featured' => ! $post->featured,
17
+            'featured' => !$post->featured,
18 18
         ]);
19 19
 
20 20
         $this->post = $post;
Please login to merge, or discard this patch.
src/Repositories/ProjectRepository.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 indexProject()
14 14
     {
15 15
         $projects = config('adminetic.caching', true)
16
-            ? (Cache::has('projects') ? Cache::get('projects') : Cache::rememberForever('projects', function () {
16
+            ? (Cache::has('projects') ? Cache::get('projects') : Cache::rememberForever('projects', function() {
17 17
                 return Project::latest()->get();
18 18
             }))
19 19
             : Project::latest()->get();
Please login to merge, or discard this patch.
src/Repositories/PackageRepository.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 indexPackage()
14 14
     {
15 15
         $packages = config('adminetic.caching', true)
16
-            ? (Cache::has('packages') ? Cache::get('packages') : Cache::rememberForever('packages', function () {
16
+            ? (Cache::has('packages') ? Cache::get('packages') : Cache::rememberForever('packages', function() {
17 17
                 return Package::latest()->get();
18 18
             }))
19 19
             : Package::latest()->get();
Please login to merge, or discard this patch.
src/Repositories/CounterRepository.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 indexCounter()
14 14
     {
15 15
         $counters = config('adminetic.caching', true)
16
-            ? (Cache::has('counters') ? Cache::get('counters') : Cache::rememberForever('counters', function () {
16
+            ? (Cache::has('counters') ? Cache::get('counters') : Cache::rememberForever('counters', function() {
17 17
                 return Counter::latest()->get();
18 18
             }))
19 19
             : Counter::latest()->get();
Please login to merge, or discard this patch.
src/Repositories/VideoRepository.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 indexVideo()
15 15
     {
16 16
         $videos = config('adminetic.caching', true)
17
-            ? (Cache::has('videos') ? Cache::get('videos') : Cache::rememberForever('videos', function () {
17
+            ? (Cache::has('videos') ? Cache::get('videos') : Cache::rememberForever('videos', function() {
18 18
                 return Video::latest()->get();
19 19
             }))
20 20
             : Video::latest()->get();
Please login to merge, or discard this patch.