Passed
Push — dev6 ( 10677b...04df47 )
by Ron
16:49
created
app/Policies/GatePolicy.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function adminLink(User $user)
17 17
     {
18
-        $userRole = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q)
19
-        {
18
+        $userRole = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) {
20 19
             $q->whereIsAdminLink(1);
21 20
         })->whereAllow(1)->count();
22 21
 
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $newCust      = Customer::create($cust);
61 61
 
62 62
         event(new NewCustomerCreated($newCust));
63
-        return redirect(route('customers.show',$newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']);
63
+        return redirect(route('customers.show', $newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']);
64 64
     }
65 65
 
66 66
     /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                         ->with('ParentFile.FileUpload')
91 91
                         ->firstOrFail();
92 92
         //  Determine if the customer is bookmarked by the user
93
-        $isFav    = UserCustomerBookmark::where('user_id', Auth::user()->user_id)
93
+        $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id)
94 94
                         ->where('cust_id', $customer->cust_id)
95 95
                         ->count();
96 96
 
@@ -100,29 +100,29 @@  discard block
 block discarded – undo
100 100
             'file_types'     => CustomerFileType::all(),
101 101
             //  User Permissions for customers
102 102
             'user_data' => [
103
-                'fav'        => $isFav,                                                  //  Customer is bookmarked by the user
104
-                'edit'       => Auth::user()->can('update', $customer),                  //  User is allowed to edit the customers basic details
105
-                'manage'     => Auth::user()->can('manage', $customer),                  //  User can recover deleted items
106
-                'deactivate' => Auth::user()->can('delete', $customer),                  //  User can deactivate the customer profile
103
+                'fav'        => $isFav, //  Customer is bookmarked by the user
104
+                'edit'       => Auth::user()->can('update', $customer), //  User is allowed to edit the customers basic details
105
+                'manage'     => Auth::user()->can('manage', $customer), //  User can recover deleted items
106
+                'deactivate' => Auth::user()->can('delete', $customer), //  User can deactivate the customer profile
107 107
                 'equipment'  => [
108
-                    'create' => Auth::user()->can('create', CustomerEquipment::class),   //  If user can add equipment
109
-                    'update' => Auth::user()->can('update', CustomerEquipment::class),   //  If user can edit equipment
110
-                    'delete' => Auth::user()->can('delete', CustomerEquipment::class),   //  If user can delete equipment
108
+                    'create' => Auth::user()->can('create', CustomerEquipment::class), //  If user can add equipment
109
+                    'update' => Auth::user()->can('update', CustomerEquipment::class), //  If user can edit equipment
110
+                    'delete' => Auth::user()->can('delete', CustomerEquipment::class), //  If user can delete equipment
111 111
                 ],
112 112
                 'contacts'   => [
113
-                    'create' => Auth::user()->can('create', CustomerContact::class),     //  If user can add contact
114
-                    'update' => Auth::user()->can('update', CustomerContact::class),     //  If user can edit contact
115
-                    'delete' => Auth::user()->can('delete', CustomerContact::class),     //  If user can delete contact
113
+                    'create' => Auth::user()->can('create', CustomerContact::class), //  If user can add contact
114
+                    'update' => Auth::user()->can('update', CustomerContact::class), //  If user can edit contact
115
+                    'delete' => Auth::user()->can('delete', CustomerContact::class), //  If user can delete contact
116 116
                 ],
117 117
                 'notes'      => [
118
-                    'create' => Auth::user()->can('create', CustomerNote::class),        //  If user can add note
119
-                    'update' => Auth::user()->can('update', CustomerNote::class),        //  If user can edit note
120
-                    'delete' => Auth::user()->can('delete', CustomerNote::class),        //  If user can delete note
118
+                    'create' => Auth::user()->can('create', CustomerNote::class), //  If user can add note
119
+                    'update' => Auth::user()->can('update', CustomerNote::class), //  If user can edit note
120
+                    'delete' => Auth::user()->can('delete', CustomerNote::class), //  If user can delete note
121 121
                 ],
122 122
                 'files'     => [
123
-                    'create' => Auth::user()->can('create', CustomerFile::class),        //  If user can add file
124
-                    'update' => Auth::user()->can('update', CustomerFile::class),        //  If user can edit file
125
-                    'delete' => Auth::user()->can('delete', CustomerFile::class),        //  If user can delete file
123
+                    'create' => Auth::user()->can('create', CustomerFile::class), //  If user can add file
124
+                    'update' => Auth::user()->can('update', CustomerFile::class), //  If user can edit file
125
+                    'delete' => Auth::user()->can('delete', CustomerFile::class), //  If user can delete file
126 126
                 ],
127 127
             ],
128 128
         ]);
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerFileTypesController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         $fileType = CustomerFileType::find($id);
66 66
         $this->authorize('delete', $fileType);
67 67
 
68
-        try{
68
+        try {
69 69
             $fileType->delete();
70 70
         }
71 71
         //  The deletion may fail if the file type is currently in use
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,8 @@
 block discarded – undo
65 65
         $fileType = CustomerFileType::find($id);
66 66
         $this->authorize('delete', $fileType);
67 67
 
68
-        try{
68
+        try
69
+        {
69 70
             $fileType->delete();
70 71
         }
71 72
         //  The deletion may fail if the file type is currently in use
Please login to merge, or discard this patch.
app/Traits/TechTipTrait.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
             if(isset($equip['laravel_through_key']))
39 39
             {
40 40
                 //  Remove that piece from the current equipment list so it is not updated later
41
-                $current = $current->filter(function($i) use ($equip)
42
-                {
41
+                $current = $current->filter(function($i) use ($equip) {
43 42
                     return $i->equip_id != $equip['equip_id'];
44 43
                 });
45 44
             }
Please login to merge, or discard this patch.
app/Actions/OrderEquipDataTypes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
             if($field !== null)
18 18
             {
19 19
                 //  Determine if this is a new or existing field type
20
-                $fieldID  = DataFieldType::where('name', $field)->first();
20
+                $fieldID = DataFieldType::where('name', $field)->first();
21 21
                 if(!$fieldID)
22 22
                 {
23 23
                     $fieldID = DataFieldType::create(['name' => $field]);
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/Config/SetConfigController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
      */
18 18
     public function __invoke(SettingsRequest $request)
19 19
     {
20
-        $this->saveSettings('app.timezone',             $request->timezone);
20
+        $this->saveSettings('app.timezone', $request->timezone);
21 21
         $this->saveSettings('filesystems.max_filesize', $request->filesize);
22
-        $this->saveSettings('app.url',                  $request->url);
22
+        $this->saveSettings('app.url', $request->url);
23 23
 
24 24
         event(new GlobalConfigUpdatedEvent($request));
25 25
         return back()->with([
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/Logs/SetLogSettingsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function __invoke(LogSettingsRequest $request)
19 19
     {
20
-        $this->saveSettings('logging.days',      $request->days);
20
+        $this->saveSettings('logging.days', $request->days);
21 21
         $this->saveSettings('logging.log_level', $request->level);
22 22
 
23 23
         event(new LogSettingsUpdatedEvent(['days' => $request->days, 'level' => $request->level]));
Please login to merge, or discard this patch.
app/Http/Requests/Admin/LogSettingsRequest.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 authorize()
15 15
     {
16
-        return $this->user()->can('viewAny', AppSettings::class);;
16
+        return $this->user()->can('viewAny', AppSettings::class); ;
17 17
     }
18 18
 
19 19
     /**
Please login to merge, or discard this patch.
app/Traits/LogUtilitiesTrait.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,26 +21,26 @@  discard block
 block discarded – undo
21 21
      * Log Levels
22 22
      */
23 23
     protected $logLevels = [
24
-        ['name' => 'Emergency', 'icon' => 'fas fa-ambulance',            'color' => ''],
25
-        ['name' => 'Alert',     'icon' => 'fas fa-bullhorn',             'color' => ''],
26
-        ['name' => 'Critical',  'icon' => 'fas fa-heartbeat',            'color' => ''],
27
-        ['name' => 'Error',     'icon' => 'fas fa-times-circle',         'color' => ''],
28
-        ['name' => 'Warning',   'icon' => 'fas fa-exclamation-triangle', 'color' => ''],
29
-        ['name' => 'Notice',    'icon' => 'fas fa-exclamation-circle',   'color' => ''],
30
-        ['name' => 'Info',      'icon' => 'fas fa-info',                 'color' => ''],
31
-        ['name' => 'Debug',     'icon' => 'fas fa-bug',                  'color' => ''],
24
+        ['name' => 'Emergency', 'icon' => 'fas fa-ambulance', 'color' => ''],
25
+        ['name' => 'Alert', 'icon' => 'fas fa-bullhorn', 'color' => ''],
26
+        ['name' => 'Critical', 'icon' => 'fas fa-heartbeat', 'color' => ''],
27
+        ['name' => 'Error', 'icon' => 'fas fa-times-circle', 'color' => ''],
28
+        ['name' => 'Warning', 'icon' => 'fas fa-exclamation-triangle', 'color' => ''],
29
+        ['name' => 'Notice', 'icon' => 'fas fa-exclamation-circle', 'color' => ''],
30
+        ['name' => 'Info', 'icon' => 'fas fa-info', 'color' => ''],
31
+        ['name' => 'Debug', 'icon' => 'fas fa-bug', 'color' => ''],
32 32
     ];
33 33
 
34 34
     /**
35 35
      * Log Channels
36 36
      */
37 37
     protected $logChannels = [
38
-        ['name' => 'Emergency',      'folder' => 'Emergency'],
39
-        ['name' => 'Application',    'folder' => 'Application'],
40
-        ['name' => 'User',           'folder' => 'Users'],
38
+        ['name' => 'Emergency', 'folder' => 'Emergency'],
39
+        ['name' => 'Application', 'folder' => 'Application'],
40
+        ['name' => 'User', 'folder' => 'Users'],
41 41
         ['name' => 'Authentication', 'folder' => 'Auth'],
42
-        ['name' => 'Customer',       'folder' => 'Cust'],
43
-        ['name' => 'Tech Tip',       'folder' => 'TechTip'],
42
+        ['name' => 'Customer', 'folder' => 'Cust'],
43
+        ['name' => 'Tech Tip', 'folder' => 'TechTip'],
44 44
     ];
45 45
 
46 46
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     protected function getFileStats($fileArr, $filename)
100 100
     {
101
-        $stats   = $this->resetStats($filename);
101
+        $stats = $this->resetStats($filename);
102 102
 
103 103
         //  Cycle through each line of the file
104 104
         foreach($fileArr as $line)
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     protected function getChannelDetails($channel)
50 50
     {
51
-        return Arr::first($this->logChannels, function($value) use ($channel)
52
-        {
51
+        return Arr::first($this->logChannels, function($value) use ($channel) {
53 52
             return $value['name'] == $channel;
54 53
         });
55 54
     }
Please login to merge, or discard this patch.