Passed
Branch dev5 (1d6d9a)
by Ron
09:07
created
config/filesystems.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
33 33
     ],
34 34
     'paths' => [
35 35
         'default'    => env('DFLT_FOLDER', DIRECTORY_SEPARATOR.'default'),
36
-        'systems'    => env('SYS_FOLDER',  DIRECTORY_SEPARATOR.'systems'),
36
+        'systems'    => env('SYS_FOLDER', DIRECTORY_SEPARATOR.'systems'),
37 37
         'customers'  => env('CUST_FOLDER', DIRECTORY_SEPARATOR.'customers'),
38 38
         'users'      => env('USER_FOLDER', DIRECTORY_SEPARATOR.'users'),
39
-        'tips'       => env('TIP_FOLDER',  DIRECTORY_SEPARATOR.'tips'),
39
+        'tips'       => env('TIP_FOLDER', DIRECTORY_SEPARATOR.'tips'),
40 40
         'links'      => env('LINK_FOLDER', DIRECTORY_SEPARATOR.'links'),
41 41
         'company'    => env('COMP_FOLDER', DIRECTORY_SEPARATOR.'company'),
42
-        'max_size'   => env('MAX_UPLOAD',  1600),    //  Megabytes = Default = 1600 - 2GB
42
+        'max_size'   => env('MAX_UPLOAD', 1600), //  Megabytes = Default = 1600 - 2GB
43 43
     ],
44 44
 ];
Please login to merge, or discard this patch.
app/TechTips.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
     use SoftDeletes;
11 11
 
12 12
     protected $primaryKey = 'tip_id';
13
-    protected $fillable   = ['user_id', 'subject', 'tip_type_id', 'description', 'created_at'];  // ToDo:  Remove Created_at - future build
13
+    protected $fillable   = ['user_id', 'subject', 'tip_type_id', 'description', 'created_at']; // ToDo:  Remove Created_at - future build
14 14
     protected $hidden     = ['public', 'user_id', 'tip_type_id'];
15 15
     protected $casts      = [
16 16
         'created_at' => 'datetime:M d, Y',
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     public function systemTypes()
21 21
     {
22
-        return $this->hasManyThrough('App\SystemTypes', 'App\TechTipSystems',  'tip_id', 'sys_id', 'tip_id', 'sys_id');
22
+        return $this->hasManyThrough('App\SystemTypes', 'App\TechTipSystems', 'tip_id', 'sys_id', 'tip_id', 'sys_id');
23 23
     }
24 24
 
25 25
     public function user()
Please login to merge, or discard this patch.
app/Providers/FormGroupServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
     public function boot()
26 26
     {
27 27
         //  Service provider to customize form inputs
28
-        Form::component('bsText',     'components.form.text',     ['name', 'label', 'value' => null, 'attributes' => []]);
28
+        Form::component('bsText', 'components.form.text', ['name', 'label', 'value' => null, 'attributes' => []]);
29 29
         Form::component('bsPassword', 'components.form.password', ['name', 'label', 'value' => null, 'attributes' => []]);
30
-        Form::component('bsNumber',   'components.form.number',   ['name', 'label', 'value' => null, 'attributes' => []]);
31
-        Form::component('bsEmail',    'components.form.email',    ['name', 'label', 'value' => null, 'attributes' => []]);
32
-        Form::component('bsDate',     'components.form.date',     ['name', 'label', 'value' => null, 'attributes' => []]);
30
+        Form::component('bsNumber', 'components.form.number', ['name', 'label', 'value' => null, 'attributes' => []]);
31
+        Form::component('bsEmail', 'components.form.email', ['name', 'label', 'value' => null, 'attributes' => []]);
32
+        Form::component('bsDate', 'components.form.date', ['name', 'label', 'value' => null, 'attributes' => []]);
33 33
         Form::component('bsTextarea', 'components.form.textarea', ['name', 'label', 'value' => null, 'attributes' => []]);
34 34
         Form::component('bsCheckbox', 'components.form.checkbox', ['name', 'label', 'value' => 'on', 'checked' => false, 'attributes' => []]);
35
-        Form::component('bsSelect',   'components.form.select',   ['name', 'label', 'list', 'selected' => null, 'attributes' => []]);
35
+        Form::component('bsSelect', 'components.form.select', ['name', 'label', 'list', 'selected' => null, 'attributes' => []]);
36 36
         //  Custom Submit button
37 37
         Form::component('bsSubmit', 'components.form.submit', ['name']);
38 38
         //  List of all states in a dropdown box
Please login to merge, or discard this patch.
app/TechTipComments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     protected $primaryKey = 'comment_id';
10 10
     protected $fillable   = ['tip_id', 'user_id', 'comment'];
11
-    protected $hidden     = [ 'user_id' ];
11
+    protected $hidden     = ['user_id'];
12 12
     protected $casts      = [
13 13
         'created_at' => 'datetime:M d, Y',
14 14
         'updated_at' => 'datetime:M d, Y',
Please login to merge, or discard this patch.
app/Http/Middleware/CheckPasswordExpire.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             if(Auth::user()->password_expires !== null)
26 26
             {
27 27
                 $passExp = new Carbon((Auth::user()->password_expires));
28
-                if(Carbon::now() > $passExp )
28
+                if(Carbon::now() > $passExp)
29 29
                 {
30 30
                     Log::notice('User '.Auth::user()->full_name.' is being forced to change their password.');
31 31
                     $request->session()->flash('change_password', 'change_password');
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@
 block discarded – undo
35 35
         Log::debug('Tech Tip Favorites for ' . Auth::user()->full_name . ': ', $tipFavs->toArray());
36 36
 
37 37
         return view('dashboard', [
38
-           'custFavs'    => $custFavs,
39
-           'tipFavs'     => $tipFavs,
40
-           'tips30'      => $tips30Days,
41
-           'tipsAll'     => $tipsTotal,
42
-           'activeLinks' => $activeLinks,
43
-           'totalLinks'  => $totalLinks,
38
+            'custFavs'    => $custFavs,
39
+            'tipFavs'     => $tipFavs,
40
+            'tips30'      => $tips30Days,
41
+            'tipsAll'     => $tipsTotal,
42
+            'activeLinks' => $activeLinks,
43
+            'totalLinks'  => $totalLinks,
44 44
         ]);
45 45
     }
46 46
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
         $totalLinks  = FileLinks::where('user_id', Auth::user()->user_id)->count();
31 31
 
32 32
         //  Debug Data
33
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
33
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
34 34
         Log::debug('Customer Favorites for '.Auth::user()->full_name.': ', $custFavs->toArray());
35
-        Log::debug('Tech Tip Favorites for ' . Auth::user()->full_name . ': ', $tipFavs->toArray());
35
+        Log::debug('Tech Tip Favorites for '.Auth::user()->full_name.': ', $tipFavs->toArray());
36 36
 
37 37
         return view('dashboard', [
38 38
            'custFavs'    => $custFavs,
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     //  About page
48 48
     public function about()
49 49
     {
50
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
50
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
51 51
 
52 52
         return view('about', [
53 53
             'branch' => 'latest'
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     public function getNotifications()
59 59
     {
60 60
         //  Debug Data
61
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
61
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
62 62
         Log::debug('Notifications for '.Auth::user()->full_name.':', Auth::user()->notifications->toArray());
63 63
 
64 64
         return Auth::user()->notifications;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     //  Mark a notification as read
68 68
     public function markNotification($id)
69 69
     {
70
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
70
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
71 71
 
72 72
         $notification = Auth::user()->notifications()->where('id', $id)->where('notifiable_id', Auth::user()->user_id)->first();
73 73
         if(!$notification)
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         }
94 94
         else
95 95
         {
96
-            Log::error('User ' . Auth::user()->full_name . ' tried to delete an invalid notification as read.  Notification ID: ' . $id);
96
+            Log::error('User '.Auth::user()->full_name.' tried to delete an invalid notification as read.  Notification ID: '.$id);
97 97
             return abort(404);
98 98
         }
99 99
 
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     //  Submit the new user settings
37 37
     public function submit(Request $request)
38 38
     {
39
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data: ', $request->toArray());
39
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data: ', $request->toArray());
40 40
 
41 41
         $request->validate([
42 42
             'username'   => 'required',
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     //  Submit the user notification settings
66 66
     public function notifications(Request $request)
67 67
     {
68
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name . '. Submitted Data: ', $request->toArray());
68
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data: ', $request->toArray());
69 69
 
70 70
         UserSettings::where('user_id', Auth::user()->user_id)->update(
71 71
         [
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     //  Submit the change password form
92 92
     public function submitPassword(Request $request)
93 93
     {
94
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
94
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
95 95
 
96 96
         //  Validate form data
97 97
         $request->validate([
Please login to merge, or discard this patch.
app/User.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
     protected $primaryKey = 'user_id';
15 15
     protected $fillable   = ['role_id', 'username', 'first_name', 'last_name', 'email', 'password', 'password_expires', 'active'];
16
-    protected $appends    = [ 'full_name' ];
16
+    protected $appends    = ['full_name'];
17 17
     protected $hidden     = ['password', 'remember_token', 'is_installer', 'active', 'created_at', 'password_expires', 'updated_at', 'user_id', 'username'];
18 18
     protected $casts      = [
19 19
         'created_at' => 'datetime:M d, Y',
Please login to merge, or discard this patch.
app/Http/Controllers/DownloadController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             $user = \Request::ip();
43 43
         }
44 44
 
45
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . $user);
45
+        Log::debug('Route '.Route::currentRouteName().' visited by '.$user);
46 46
 
47 47
         //  Check that the file exists before allowing it to be downloaded
48 48
         if(!empty($fileData) && Storage::exists($fileData->file_link.$fileData->file_name))
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     public function archiveFiles(Request $request)
60 60
     {
61 61
         //  Debug Data
62
-        if (Auth::user()) {
62
+        if(Auth::user()) {
63 63
             $user = Auth::user()->full_name;
64 64
         } else {
65 65
             $user = \Request::ip();
66 66
         }
67
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . $user.'  Request Data:', $request->toArray());
67
+        Log::debug('Route '.Route::currentRouteName().' visited by '.$user.'  Request Data:', $request->toArray());
68 68
 
69 69
         //  Validate the array
70 70
         $request->validate([
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function downloadArchive($fileName)
108 108
     {
109 109
         //  Debug Data
110
-        if (Auth::user()) {
110
+        if(Auth::user()) {
111 111
             $user = Auth::user()->full_name;
112 112
         } else {
113 113
             $user = \Request::ip();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         //  Debug Data
132 132
         $this->middleware('auth');
133
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
133
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
134 134
 
135 135
         $note = CustomerNotes::find($id);
136 136
         $cust = Customers::find($note->cust_id);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         //  Debug Data
152 152
         $this->middleware('auth');
153
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
153
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
154 154
 
155 155
         //  TODO - Makt this a better looking pdf
156 156
         $tip = TechTips::where('tip_id', $id)->with('User')->with('SystemTypes')->first();
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,9 +59,12 @@  discard block
 block discarded – undo
59 59
     public function archiveFiles(Request $request)
60 60
     {
61 61
         //  Debug Data
62
-        if (Auth::user()) {
62
+        if (Auth::user())
63
+        {
63 64
             $user = Auth::user()->full_name;
64
-        } else {
65
+        }
66
+        else
67
+        {
65 68
             $user = \Request::ip();
66 69
         }
67 70
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . $user.'  Request Data:', $request->toArray());
@@ -107,9 +110,12 @@  discard block
 block discarded – undo
107 110
     public function downloadArchive($fileName)
108 111
     {
109 112
         //  Debug Data
110
-        if (Auth::user()) {
113
+        if (Auth::user())
114
+        {
111 115
             $user = Auth::user()->full_name;
112
-        } else {
116
+        }
117
+        else
118
+        {
113 119
             $user = \Request::ip();
114 120
         }
115 121
         Log::debug('Route '.Route::currentRouteName().' visited by '.$user);
Please login to merge, or discard this patch.