Completed
Push — dev5 ( d45a54...be76cd )
by Ron
09:51
created
database/factories/FileLinkFilesFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use App\Model;
6 6
 use Faker\Generator as Faker;
7 7
 
8
-$factory->define(App\FileLinkFiles::class, function (Faker $faker) {
8
+$factory->define(App\FileLinkFiles::class, function(Faker $faker) {
9 9
     return [
10 10
         'link_id'  => factory(App\FileLinks::class)->create()->link_id,
11 11
         'file_id'  => factory(App\Files::class)->create()->file_id,
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
         'link_id'  => factory(App\FileLinks::class)->create()->link_id,
11 11
         'file_id'  => factory(App\Files::class)->create()->file_id,
12 12
         'user_id'  => factory(App\User::class)->create()->user_id,
13
-        'added_by' => NULL,
13
+        'added_by' => null,
14 14
         'upload'   => 0
15 15
     ];
16 16
 });
Please login to merge, or discard this patch.
app/TechTips.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 class TechTips extends Model
8 8
 {
9 9
     protected $primaryKey = 'tip_id';
10
-    protected $fillable = ['user_id', 'subject', 'documentation', 'description', 'created_at'];  // ToDo:  Remove Created_at - future build
10
+    protected $fillable = ['user_id', 'subject', 'documentation', 'description', 'created_at']; // ToDo:  Remove Created_at - future build
11 11
     
12 12
     public function user()
13 13
     {
Please login to merge, or discard this patch.
app/Http/Controllers/TechTips/TechTipsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         
111 111
         //  Get the types of documents that can be filtered
112 112
 //        $fileTypes = SystemFileTypes::all();
113
-        $typesArr  = ['Tech Tip', 'Documentation'];
113
+        $typesArr = ['Tech Tip', 'Documentation'];
114 114
 //        foreach($fileTypes as $type)
115 115
 //        {
116 116
 //            $typesArr[] = $type->description;
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     
275 275
     public function search(Request $request)
276 276
     {
277
-        Log::debug('request Data -> '. $request->getContent());
277
+        Log::debug('request Data -> '.$request->getContent());
278 278
         $tips = [];
279 279
             
280 280
         //  Determine if the search form is empty or has data in it
Please login to merge, or discard this patch.
database/migrations/2018_11_27_193438_create_settings_table.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@
 block discarded – undo
22 22
         
23 23
         //  Insert default settings
24 24
         DB::table('settings')->insert([
25
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.logo',          'value' => config('app.logo')],
26
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.timezone',      'value' => config('app.timezone')],
27
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.host',         'value' => config('mail.host')],
28
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.port',         'value' => config('mail.port')],
29
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.encryption',   'value' => config('mail.encryption')],
30
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.username',     'value' => config('mail.username')],
31
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.password',     'value' => config('mail.password')],
25
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.logo', 'value' => config('app.logo')],
26
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.timezone', 'value' => config('app.timezone')],
27
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.host', 'value' => config('mail.host')],
28
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.port', 'value' => config('mail.port')],
29
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.encryption', 'value' => config('mail.encryption')],
30
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.username', 'value' => config('mail.username')],
31
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.password', 'value' => config('mail.password')],
32 32
             ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.from.address', 'value' => config('mail.from.address')],
33
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.from.name',    'value' => config('mail.from.name')],
34
-            ['created_at' => \Carbon\Carbon::now(), 'key' => 'user.passExpires',  'value' => 30],
33
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.from.name', 'value' => config('mail.from.name')],
34
+            ['created_at' => \Carbon\Carbon::now(), 'key' => 'user.passExpires', 'value' => 30],
35 35
         ]);
36 36
     }
37 37
 
Please login to merge, or discard this patch.
database/migrations/2019_10_19_175205_updates_for_version_5_0.php 1 patch
Braces   +6 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
         //  Add the 'documentation' column in the tech_tips table
80 80
         if(!Schema::hasColumn('tech_tips', 'documentation'))
81 81
         {
82
-            Schema::table('tech_tips', function(Blueprint $table) 
83
-            {
82
+            Schema::table('tech_tips', function(Blueprint $table) {
84 83
                 $table->boolean('documentation')->default(0)->nullable()->after('public');
85 84
             });
86 85
             
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
         //  Add the 'is_installer' column in the users table
114 113
         if(!Schema::hasColumn('users', 'is_installer'))
115 114
         {
116
-            Schema::table('users', function(Blueprint $table)
117
-            {
115
+            Schema::table('users', function(Blueprint $table) {
118 116
                 $table->boolean('is_installer')->default(0)->after('active');
119 117
             });
120 118
             
@@ -198,8 +196,7 @@  discard block
 block discarded – undo
198 196
                         ]);
199 197
                     }
200 198
                 }
201
-                Schema::table('user_role', function(Blueprint $table)
202
-                {
199
+                Schema::table('user_role', function(Blueprint $table) {
203 200
                     $table->dropForeign(['user_id']);
204 201
                     $table->dropForeign(['role_id']);
205 202
                 });
@@ -211,8 +208,7 @@  discard block
 block discarded – undo
211 208
         //  Remove the system_files and system_file_types table
212 209
         if(Schema::hasTable('system_files'))
213 210
         {
214
-            Schema::table('system_files', function(Blueprint $table)
215
-            {
211
+            Schema::table('system_files', function(Blueprint $table) {
216 212
                 $table->dropForeign(['sys_id']);
217 213
                 $table->dropForeign(['type_id']);
218 214
                 $table->dropForeign(['file_id']);
@@ -230,7 +226,7 @@  discard block
 block discarded – undo
230 226
      * @return void
231 227
      */
232 228
     public function down()
233
-    {   
229
+    {
234 230
         if(Schema::hasColumn('file_links', 'cust_id'))
235 231
         {
236 232
             Schema::table('file_links', function(Blueprint $table) {
@@ -248,8 +244,7 @@  discard block
 block discarded – undo
248 244
         
249 245
         if(Schema::hasColumn('tech_tips', 'documentation'))
250 246
         {
251
-            Schema::table('tech_tips', function(Blueprint $table) 
252
-            {
247
+            Schema::table('tech_tips', function(Blueprint $table) {
253 248
                 $table->dropColumn('documentation');
254 249
             });
255 250
         }
Please login to merge, or discard this patch.
database/migrations/2019_10_19_175019_create_user_permissions_table.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 up()
15 15
     {
16
-        Schema::create('user_permissions', function (Blueprint $table) {
16
+        Schema::create('user_permissions', function(Blueprint $table) {
17 17
             $table->increments('user_id')->unsigned();
18 18
             $table->boolean('manage_users')->default(0);
19 19
             $table->boolean('run_reports')->default(0);
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,16 +68,16 @@
 block discarded – undo
68 68
     {
69 69
         UserSettings::where('user_id', Auth::user()->user_id)->update(
70 70
         [
71
-            'em_tech_tip'     => $request->em_tech_tip     === 'on' ? true : false,
72
-            'em_file_link'    => $request->em_file_link    === 'on' ? true : false,
71
+            'em_tech_tip'     => $request->em_tech_tip === 'on' ? true : false,
72
+            'em_file_link'    => $request->em_file_link === 'on' ? true : false,
73 73
             'em_notification' => $request->em_notification === 'on' ? true : false,
74
-            'auto_del_link'   => $request->auto_del_link   === 'on' ? true : false,
74
+            'auto_del_link'   => $request->auto_del_link === 'on' ? true : false,
75 75
         ]);
76 76
 
77 77
         session()->flash('success', 'User Notifications Updated');
78 78
 
79 79
         Log::notice('User Notifications Updated', ['user_id' => Auth::user()->user_id]);
80
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id);
80
+        Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id);
81 81
         Log::debug('Submitted Data - ', $request->toArray());
82 82
         return redirect(route('account'));
83 83
     }
Please login to merge, or discard this patch.
database/factories/UserPermissionsFactory.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\UserPermissions;
6 6
 use Faker\Generator as Faker;
7 7
 
8
-$factory->define(App\UserPermissions::class, function (Faker $faker) {
8
+$factory->define(App\UserPermissions::class, function(Faker $faker) {
9 9
     return [
10 10
         'user_id'             => 0,
11 11
         'manage_users'        => 0,
Please login to merge, or discard this patch.
app/Files.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
             $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : '';
41 41
             
42 42
             //  Look to see if a number is already appended to a file.  (example - file(1).pdf)
43
-            if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) 
43
+            if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match))
44 44
             {
45 45
                 // Has a number, increment it
46 46
                 $base = $match[1];
47 47
                 $number = intVal($match[2]);
48
-            } 
49
-            else 
48
+            }
49
+            else
50 50
             {
51 51
                 // No number, add one
52 52
                 $base = $fileParts['filename'];
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             }
55 55
             
56 56
             //  Increase the number until one that is not in use is found
57
-            do 
57
+            do
58 58
             {
59 59
                 $fileName = $base.'('.++$number.')'.$extension;
60 60
             } while(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName));
Please login to merge, or discard this patch.