Passed
Push — dev5 ( 978ab8...1c1697 )
by Ron
13:40
created
database/seeds/DatabaseSeeder.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
     public function run()
13 13
     {
14 14
         //  TODO:  add seeders for demo setup
15
-         $this->call(UserTableSeeder::class);
16
-         $this->call(EquipmentSeeder::class);
17
-         $this->call(CustomerSeeder::class);
18
-         $this->call(TechTipsSeeder::class);
19
-         $this->call(ConfigSeeder::class);
15
+            $this->call(UserTableSeeder::class);
16
+            $this->call(EquipmentSeeder::class);
17
+            $this->call(CustomerSeeder::class);
18
+            $this->call(TechTipsSeeder::class);
19
+            $this->call(ConfigSeeder::class);
20 20
     }
21 21
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerDetailsController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     //  Submit the new customer form
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
         $this->authorize('hasAccess', 'Add Customer');
38 38
 
39 39
         $request->validate([
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         ]);
73 73
 
74 74
         Log::notice('New Customer ID-'.$request->custID.' created by '.Auth::user()->full_name);
75
-        return response()->json(['success' => true, 'cust_id' => $custData->cust_id ]);
75
+        return response()->json(['success' => true, 'cust_id' => $custData->cust_id]);
76 76
     }
77 77
 
78 78
     //  Show the customer details
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $fileTypes = new CustomerFileTypesCollection(CustomerFileTypes::all());
92 92
         $parent    = $custDetails->parent_id ? Customers::find($custDetails->parent_id)->name : null;
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
         return view('customer.details', [
96 96
             'cust_id'     => $custDetails->cust_id,
97 97
             'details'     => $custDetails->toJson(),
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     //  Update the customer details
107 107
     public function update(Request $request, $id)
108 108
     {
109
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
109
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
110 110
 
111 111
         $request->validate([
112 112
             'name'     => 'required',
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     //  Link a site to a parent site
136 136
     public function linkParent(Request $request)
137 137
     {
138
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
138
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
139 139
 
140 140
         $request->validate([
141 141
             'parent_id' => 'required|numeric|exists:customers,cust_id',
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         $parentsParent = Customers::find($request->parent_id);
146 146
 
147
-        if ($parentsParent->parent_id)
147
+        if($parentsParent->parent_id)
148 148
         {
149 149
             $request->parent_id = $parentsParent->parent_id;
150 150
         }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
     public function removeParent($id)
162 162
     {
163
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
163
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
164 164
         Customers::find($id)->update(['parent_id' => null]);
165 165
         Log::info('Parent Customer ID was removed for Customer ID '.$id.' by '.Auth::user()->full_name);
166 166
     }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     //  Deactivate a customer - note this will not remove it from the database, but make it inaccessable
169 169
     public function destroy($id)
170 170
     {
171
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
171
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
172 172
         $this->authorize('hasAccess', 'Deactivate Customer');
173 173
 
174 174
         //  Remove the customer from any users favorites
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/Http/Controllers/Auth/InitializeUserController.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,26 +25,26 @@
 block discarded – undo
25 25
         //  Validate the hash token
26 26
         $user = UserInitialize::where('token', $hash)->get();
27 27
 
28
-        if ($user->isEmpty()) {
29
-            Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash);
28
+        if($user->isEmpty()) {
29
+            Log::warning('Visitor at IP Address '.\Request::ip().' tried to access invalid initialize hash - '.$hash);
30 30
             return abort(404);
31 31
         }
32 32
 
33
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address .'.\Request::ip());
34
-        Log::debug('Link Hash -' . $hash);
33
+        Log::debug('Route '.Route::currentRouteName().' visited by IP Address .'.\Request::ip());
34
+        Log::debug('Link Hash -'.$hash);
35 35
         return view('account.initializeUser', ['hash' => $hash]);
36 36
     }
37 37
 
38 38
     //  Submit the initialize user form
39 39
     public function submitInitializeUser(Request $request, $hash)
40 40
     {
41
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address -' . \Request::ip().'. Submitted Data - ', $request->toArray());
41
+        Log::debug('Route '.Route::currentRouteName().' visited by IP Address -'.\Request::ip().'. Submitted Data - ', $request->toArray());
42 42
         Log::debug('Initialize Data - ', $request->toArray());
43 43
 
44 44
         //  Verify that the link matches the assigned email address
45 45
         $valid = UserInitialize::where('token', $hash)->first();
46
-        if (empty($valid)) {
47
-            Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash);
46
+        if(empty($valid)) {
47
+            Log::warning('Visitor at IP Address '.\Request::ip().' tried to submit an invalid User Initialization link - '.$hash);
48 48
             return abort(404);
49 49
         }
50 50
 
Please login to merge, or discard this 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.
migrations/2019_11_30_195040_create_user_role_permission_types_table.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function up()
16 16
     {
17
-        Schema::create('user_role_permission_types', function (Blueprint $table) {
17
+        Schema::create('user_role_permission_types', function(Blueprint $table) {
18 18
             $table->increments('perm_type_id');
19 19
             $table->text('description');
20 20
             $table->timestamps();
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
 
23 23
         //  Insert default roles permission types
24 24
         DB::table('user_role_permission_types')->insert([
25
-            ['perm_type_id' => 1,  'description' => 'Manage Users',        'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
26
-            ['perm_type_id' => 2,  'description' => 'Manage User Roles',   'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
27
-            ['perm_type_id' => 3,  'description' => 'Run Reports',         'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
28
-            ['perm_type_id' => 4,  'description' => 'Add Customer',        'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
29
-            ['perm_type_id' => 5,  'description' => 'Manage Customers',    'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
30
-            ['perm_type_id' => 6,  'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
31
-            ['perm_type_id' => 7,  'description' => 'Use File Links',      'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
32
-            ['perm_type_id' => 8,  'description' => 'Create Tech Tip',     'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
33
-            ['perm_type_id' => 9,  'description' => 'Edit Tech Tip',       'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
34
-            ['perm_type_id' => 10, 'description' => 'Delete Tech Tip',     'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
35
-            ['perm_type_id' => 11, 'description' => 'Manage Equipment',    'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
25
+            ['perm_type_id' => 1, 'description' => 'Manage Users', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
26
+            ['perm_type_id' => 2, 'description' => 'Manage User Roles', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
27
+            ['perm_type_id' => 3, 'description' => 'Run Reports', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
28
+            ['perm_type_id' => 4, 'description' => 'Add Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
29
+            ['perm_type_id' => 5, 'description' => 'Manage Customers', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
30
+            ['perm_type_id' => 6, 'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
31
+            ['perm_type_id' => 7, 'description' => 'Use File Links', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
32
+            ['perm_type_id' => 8, 'description' => 'Create Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
33
+            ['perm_type_id' => 9, 'description' => 'Edit Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
34
+            ['perm_type_id' => 10, 'description' => 'Delete Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
35
+            ['perm_type_id' => 11, 'description' => 'Manage Equipment', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],
36 36
         ]);
37 37
     }
38 38
 
Please login to merge, or discard this patch.
database/factories/UserRolePermissionsFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use App\UserRolePermissions;
6 6
 
7
-$factory->define(UserRolePermissions::class, function () {
7
+$factory->define(UserRolePermissions::class, function() {
8 8
     return [
9 9
         'role_id'      => factory(App\UserRoleType::class)->create()->role_id,
10 10
         'perm_type_id' => factory(App\UserRolePermissionTypes::class)->create()->perm_type_id,
Please login to merge, or discard this patch.
database/factories/UserRoleTypeFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use App\UserRoleType;
6 6
 use Faker\Generator as Faker;
7 7
 
8
-$factory->define(UserRoleType::class, function (Faker $faker) {
8
+$factory->define(UserRoleType::class, function(Faker $faker) {
9 9
     return [
10 10
         'name'        => $faker->words(2, true),
11 11
         'description' => $faker->words(3, true),
Please login to merge, or discard this patch.
database/factories/UserRolePermissionTypesFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Faker\Generator as Faker;
6 6
 use App\UserRolePermissionTypes;
7 7
 
8
-$factory->define(UserRolePermissionTypes::class, function (Faker $faker) {
8
+$factory->define(UserRolePermissionTypes::class, function(Faker $faker) {
9 9
     return [
10 10
         'description' => $faker->words(2, true),
11 11
     ];
Please login to merge, or discard this patch.
database/factories/NotificationsFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Faker\Generator as Faker;
6 6
 
7
-$factory->define(Illuminate\Notifications\DatabaseNotification::class, function (Faker $faker) {
7
+$factory->define(Illuminate\Notifications\DatabaseNotification::class, function(Faker $faker) {
8 8
     return [
9 9
         'id' => $faker->uuid,
10 10
     ];
Please login to merge, or discard this patch.