Passed
Push — main ( f46541...ca24d4 )
by PRATIK
20:39 queued 16:44
created
src/Http/Livewire/Admin/Activity/ActivityTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $this->model = $model;
43 43
         $activities = Activity::all();
44
-        $this->descriptions = ! is_null($activities) ? array_unique($activities->pluck('description')->toArray()) : null;
44
+        $this->descriptions = !is_null($activities) ? array_unique($activities->pluck('description')->toArray()) : null;
45 45
         $this->log_names = array_unique($activities->pluck('log_name')->toArray());
46 46
         $this->models = array_unique($activities->pluck('subject_type')->toArray());
47 47
         $this->users = User::find($activities->pluck('causer_id')->toArray());
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function deleteWithLimit()
57 57
     {
58
-        if (! is_null($this->delete_limit)) {
58
+        if (!is_null($this->delete_limit)) {
59 59
             Activity::whereDate('created_at', '<', Carbon::now()->subDays($this->delete_limit))->delete();
60 60
             $this->emit('activity_success', 'All activities Deleted except last '.$this->delete_limit.'days activities');
61 61
         }
@@ -99,23 +99,23 @@  discard block
 block discarded – undo
99 99
         $this->resetPage();
100 100
         $data = Activity::query();
101 101
         // Filter By Log Name
102
-        if (! is_null($this->log_name)) {
102
+        if (!is_null($this->log_name)) {
103 103
             $data = $data->where('log_name', $this->log_name);
104 104
         }
105 105
         // Filter By Model
106
-        if (! is_null($this->model)) {
106
+        if (!is_null($this->model)) {
107 107
             $data = $data->where('subject_type', $this->model);
108 108
         }
109 109
         // Filter By User
110
-        if (! is_null($this->user_id)) {
110
+        if (!is_null($this->user_id)) {
111 111
             $data = $data->where('causer_id', $this->user_id);
112 112
         }
113 113
         // Filter By Date
114
-        if (! is_null($this->start_date) && ! is_null($this->end_date)) {
114
+        if (!is_null($this->start_date) && !is_null($this->end_date)) {
115 115
             $data = $data->whereDate('created_at', [$this->start_date, $this->end_date]);
116 116
         }
117 117
         // Filter Description
118
-        if (! is_null($this->description)) {
118
+        if (!is_null($this->description)) {
119 119
             $data = $data->where('description', $this->description);
120 120
         }
121 121
         $this->activity_count = with($data)->count();
Please login to merge, or discard this patch.
src/Helpers/AdminRouteHelper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @param  string  $route
7 7
  * @return string
8 8
  */
9
-if (! function_exists('adminBaseUrl')) {
9
+if (!function_exists('adminBaseUrl')) {
10 10
     function adminBaseUrl($route)
11 11
     {
12 12
         return url(config('admin.prefix', 'admin').'/'.$route);
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @param  string  $route
20 20
  * @return string
21 21
  */
22
-if (! function_exists('adminRedirectRoute')) {
22
+if (!function_exists('adminRedirectRoute')) {
23 23
     function adminRedirectRoute($route)
24 24
     {
25 25
         return adminBaseUrl($route);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
  * @param  string  $route
33 33
  * @return string
34 34
  */
35
-if (! function_exists('adminCreateRoute')) {
35
+if (!function_exists('adminCreateRoute')) {
36 36
     function adminCreateRoute($route)
37 37
     {
38 38
         return adminBaseUrl($route).'/create';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  * @param  int  $id
47 47
  * @return return_type
48 48
  */
49
-if (! function_exists('adminShowRoute')) {
49
+if (!function_exists('adminShowRoute')) {
50 50
     function adminShowRoute($route, $id)
51 51
     {
52 52
         return adminBaseUrl($route).'/'.$id;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
  * @param  int  $id
61 61
  * @return string
62 62
  */
63
-if (! function_exists('adminEditRoute')) {
63
+if (!function_exists('adminEditRoute')) {
64 64
     function adminEditRoute($route, $id)
65 65
     {
66 66
         return adminBaseUrl($route).'/'.$id.'/edit';
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  * @param  string  $route
74 74
  * @return string
75 75
  */
76
-if (! function_exists('adminStoreRoute')) {
76
+if (!function_exists('adminStoreRoute')) {
77 77
     function adminStoreRoute($route)
78 78
     {
79 79
         return adminBaseUrl($route);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
  * @param  int  $id
88 88
  * @return string
89 89
  */
90
-if (! function_exists('adminUpdateRoute')) {
90
+if (!function_exists('adminUpdateRoute')) {
91 91
     function adminUpdateRoute($route, $id)
92 92
     {
93 93
         return adminBaseUrl($route).'/'.$id;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
  * @param  int  $id
102 102
  * @return string
103 103
  */
104
-if (! function_exists('adminDeleteRoute')) {
104
+if (!function_exists('adminDeleteRoute')) {
105 105
     function adminDeleteRoute($route, $id)
106 106
     {
107 107
         return adminBaseUrl($route).'/'.$id;
Please login to merge, or discard this patch.