Passed
Push — dev5 ( 1140b1...da16e0 )
by Ron
09:38
created
app/Http/Controllers/FileLinks/FileLinksController.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -166,6 +166,10 @@
 block discarded – undo
166 166
     }
167 167
 
168 168
     //  Create the new file link
169
+
170
+    /**
171
+     * @param Request $data
172
+     */
169 173
     private function createLink($data)
170 174
     {
171 175
         //  Generate a random hash to use as the file link and make sure it is not already in use
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     //  Retrieve the instructions attached to a link
260 260
     public function getInstructions($linkID)
261 261
     {
262
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
262
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
263 263
 
264 264
         $linkData = FileLinks::select('note')->where('link_id', $linkID)->first();
265 265
         Log::debug('Link Instructions Gathered - ', array($linkData));
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     //  Update the instructions attached to the link
271 271
     public function submitInstructions(Request $request, $linkID)
272 272
     {
273
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name . '. Submitted Data - ', $request->toArray());
273
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
274 274
 
275 275
         FileLinks::find($linkID)->update([
276 276
             'note' => $request->instructions,
Please login to merge, or discard this patch.
app/Http/Controllers/FileLinks/GuestLinksController.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -119,6 +119,10 @@
 block discarded – undo
119 119
     }
120 120
 
121 121
     //  Save the file in the database
122
+
123
+    /**
124
+     * @param Request $request
125
+     */
122 126
     private function saveFile(UploadedFile $file, $id, $request)
123 127
     {
124 128
         $details = FileLinks::where('link_hash', $id)->first();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     //  Show the link details for the user
30 30
     public function show($id)
31 31
     {
32
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address ' . \Request::ip());
32
+        Log::debug('Route '.Route::currentRouteName().' visited by IP Address '.\Request::ip());
33 33
 
34 34
         $details = FileLinks::where('link_hash', $id)->first();
35 35
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     //  Notify the owner of the link that files were uploaded
147 147
     public function notify(Request $request, $id)
148 148
     {
149
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address ' . \Request::ip() . '. Submitted Data - ', $request->toArray());
149
+        Log::debug('Route '.Route::currentRouteName().' visited by IP Address '.\Request::ip().'. Submitted Data - ', $request->toArray());
150 150
 
151 151
         $request->validate([
152 152
             '_complete' => 'required',
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/Http/Controllers/Customers/CustomerSystemsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     //  Get the possible system types that can be assigned to the customer
25 25
     public function index()
26 26
     {
27
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
27
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
28 28
         $sysList = new CategoriesCollection(SystemCategories::with('SystemTypes')->with('SystemTypes.SystemDataFields.SystemDataFieldTypes')->get());
29 29
 
30 30
         return $sysList;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     //  Store a new system for the customer
34 34
     public function store(Request $request)
35 35
     {
36
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
36
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
37 37
 
38 38
         $request->validate([
39 39
             'cust_id' => 'required',
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     //  Get the list of systems attached to the customer
77 77
     public function show($id)
78 78
     {
79
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
79
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
80 80
 
81 81
         $sysList = CustomerSystems::where('cust_id', $id)
82 82
                     ->with('SystemTypes')
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     // Update the customers system data
106 106
     public function update(Request $request, $id)
107 107
     {
108
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
108
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
109 109
 
110 110
         $request->validate([
111 111
             'cust_id'    => 'required',
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         foreach($fields as $data)
126 126
         {
127
-            $fieldName = 'field_' . $data->field_id;
127
+            $fieldName = 'field_'.$data->field_id;
128 128
             if(isset($request->$fieldName))
129 129
             {
130 130
                 Log::debug($request->$fieldName);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     //  Delete a system attached to a customer
143 143
     public function destroy($id)
144 144
     {
145
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
145
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
146 146
 
147 147
         // return response('deleted '.$id);
148 148
         $system = CustomerSystems::find($id);
Please login to merge, or discard this patch.
app/Policies/GatePolicy.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
     //  Determine if a user can see the Administration Nav Link
38 38
     public function seeAdminLink(User $user)
39 39
     {
40
-        if ($this->isInstaller($user))
40
+        if($this->isInstaller($user))
41 41
         {
42 42
             return true;
43 43
         }
44 44
 
45 45
         $data = UserRolePermissions::with('UserRolePermissionTypes')
46
-            ->whereHas('UserRolePermissionTypes', function ($query) {
46
+            ->whereHas('UserRolePermissionTypes', function($query) {
47 47
                 $query->where('description', 'Manage Users')
48 48
                     ->orWhere('description', 'Manage User Roles')
49 49
                     ->orWhere('description', 'Manage Customers')
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             ->get();
55 55
 
56 56
         $allow = $data->isEmpty() ? 'Denied' : 'Allowed';
57
-        Log::debug('User ' . $user->full_name . ' is trying to see admin link.  Result - ' . $allow);
57
+        Log::debug('User '.$user->full_name.' is trying to see admin link.  Result - '.$allow);
58 58
 
59 59
         return  $data->isEmpty() ? false : true;
60 60
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
         $data = UserRolePermissions::with('UserRolePermissionTypes')
72
-            ->whereHas('UserRolePermissionTypes', function ($query) use ($task) {
72
+            ->whereHas('UserRolePermissionTypes', function($query) use ($task) {
73 73
                 $query->where('description', $task);
74 74
             })
75 75
             ->where('role_id', $user->role_id)
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
             ->get();
78 78
 
79 79
         $allow = $data->isEmpty() ? 'false' : 'true';
80
-        Log::debug('User '.$user->full_name.' is trying to access '.$task.'.  Result - ' . $allow);
81
-        if ($allow === 'Denied')
80
+        Log::debug('User '.$user->full_name.' is trying to access '.$task.'.  Result - '.$allow);
81
+        if($allow === 'Denied')
82 82
         {
83
-            Log::alert('User ' . $user->full_name . ' was denied from accessing '.$task.' link.');
83
+            Log::alert('User '.$user->full_name.' was denied from accessing '.$task.' link.');
84 84
         }
85 85
 
86 86
         return  $data->isEmpty() ? false : true;
Please login to merge, or discard this patch.
app/Console/Commands/updateRun.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@  discard block
 block discarded – undo
22 22
         $this->line('');
23 23
         //  Select which update file to use
24 24
         $updateFile = $this->checkForUpdate();
25
-        if($updateFile) {
25
+        if($updateFile)
26
+        {
26 27
             //  Open up the file and verify it is at least the same version as the current setup
27 28
             $valid = $this->openUpdate($updateFile);
28 29
 
@@ -80,7 +81,8 @@  discard block
 block discarded – undo
80 81
             $this->line('');
81 82
 
82 83
             $anticipate = [];
83
-            foreach($updateList as $key => $up) {
84
+            foreach($updateList as $key => $up)
85
+            {
84 86
                 $opt = $key + 1;
85 87
                 $anticipate[$opt] = $up;
86 88
                 $this->line('['.$opt.'] '.$up);
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/InitializeUserController.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@  discard block
 block discarded – undo
25 25
         //  Validate the hash token
26 26
         $user = UserInitialize::where('token', $hash)->get();
27 27
 
28
-        if($user->isEmpty()) {
28
+        if($user->isEmpty())
29
+        {
29 30
             Log::warning('Visitor at IP Address '.\Request::ip().' tried to access invalid initialize hash - '.$hash);
30 31
             return abort(404);
31 32
         }
@@ -43,7 +44,8 @@  discard block
 block discarded – undo
43 44
 
44 45
         //  Verify that the link matches the assigned email address
45 46
         $valid = UserInitialize::where('token', $hash)->first();
46
-        if(empty($valid)) {
47
+        if(empty($valid))
48
+        {
47 49
             Log::warning('Visitor at IP Address '.\Request::ip().' tried to submit an invalid User Initialization link - '.$hash);
48 50
             return abort(404);
49 51
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerController.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
             $searchResults = new CustomersCollection(
48 48
                 Customers::orderBy($request->sortField, $request->sortType)
49 49
                     //  Search the name, dba name, and cust id columns
50
-                    ->where(function($query) use ($request)
51
-                    {
50
+                    ->where(function($query) use ($request) {
52 51
                         $query->where('name', 'like', '%'.$request->name.'%')
53 52
                             ->orWhere('cust_id', 'like', '%'.$request->name.'%')
54 53
                             ->orWhere('dba_name', 'like', '%'.$request->name.'%');
@@ -58,10 +57,8 @@  discard block
 block discarded – undo
58 57
                     //  Include the customers systems
59 58
                     ->with('CustomerSystems.SystemTypes')
60 59
                     //  If the system field is present - search for system type
61
-                    ->when($request->system, function($query) use ($request)
62
-                    {
63
-                        $query->whereHas('CustomerSystems.SystemTypes', function($query) use ($request)
64
-                        {
60
+                    ->when($request->system, function($query) use ($request) {
61
+                        $query->whereHas('CustomerSystems.SystemTypes', function($query) use ($request) {
65 62
                             $query->where('sys_id', $request->system);
66 63
                         });
67 64
                     })
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerContactsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 
131 131
         //  Update the primary contact information
132 132
         $details = Customers::find($request->cust_id);
133
-        if ($details->parent_id && $request->shared == 'true')
133
+        if($details->parent_id && $request->shared == 'true')
134 134
         {
135 135
             $request->cust_id = $details->parent_id;
136 136
         }
Please login to merge, or discard this patch.