Passed
Push — master ( fdcd11...4b42b4 )
by Ron
07:37
created
server.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@
 block discarded – undo
14 14
 // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 15
 // built-in PHP web server. This provides a convenient way to test a Laravel
16 16
 // application without having installed a "real" web server software here.
17
-if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
17
+if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri))
18
+{
18 19
     return false;
19 20
 }
20 21
 
Please login to merge, or discard this patch.
migrations/2018_11_18_183731_alter_system_cust_data_types_table.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('system_cust_data_types', function(Blueprint $table) 
17
-        {
16
+        Schema::table('system_cust_data_types', function(Blueprint $table) {
18 17
             $table->boolean('hidden')
19 18
                 ->default(0)
20 19
                 ->after('name');
@@ -28,8 +27,7 @@  discard block
 block discarded – undo
28 27
      */
29 28
     public function down()
30 29
     {
31
-        Schema::table('system_cust_data_types', function(Blueprint $table)
32
-        {
30
+        Schema::table('system_cust_data_types', function(Blueprint $table) {
33 31
             $table->dropColumn('hidden');
34 32
         });
35 33
     }
Please login to merge, or discard this patch.
database/migrations/2018_12_06_124820_add_password_change_to_users.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function up()
17 17
     {
18
-        Schema::table('users', function(Blueprint $table)
19
-        {
18
+        Schema::table('users', function(Blueprint $table) {
20 19
             $table->timestamp('password_expires')
21 20
                 ->nullable()
22 21
                 ->after('active');
@@ -41,8 +40,7 @@  discard block
 block discarded – undo
41 40
      */
42 41
     public function down()
43 42
     {
44
-        Schema::table('users', function(Blueprint $table)
45
-        {
43
+        Schema::table('users', function(Blueprint $table) {
46 44
             $table->dropColumn('password_expires');
47 45
         });
48 46
         
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfAuthenticated.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
      */
18 18
     public function handle($request, Closure $next, $guard = null)
19 19
     {
20
-        if (Auth::guard($guard)->check()) {
20
+        if (Auth::guard($guard)->check())
21
+        {
21 22
             return redirect('/dashboard');
22 23
         }
23 24
 
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
@@ -38,20 +38,20 @@
 block discarded – undo
38 38
             $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : '';
39 39
             
40 40
             //  check for matching file names
41
-            if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) 
41
+            if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match))
42 42
             {
43 43
                 // Have a number; increment it
44 44
                 $base = $match[1];
45 45
                 $number = intVal($match[2]);
46
-            } 
47
-            else 
46
+            }
47
+            else
48 48
             {
49 49
                 // No number; add one
50 50
                 $base = $fileParts['filename'];
51 51
                 $number = 0;
52 52
             }
53 53
             
54
-            do 
54
+            do
55 55
             {
56 56
                 $fileName = $base.'('.++$number.')'.$extension;
57 57
             } while (Storage::exists($path.DIRECTORY_SEPARATOR.$fileName));
Please login to merge, or discard this patch.
routes/web.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 Route::post('/finish-setup/{hash}', 'UserController@submitInitializeUser')->name('submitInitialize');
12 12
 
13 13
 ///////////////////////////  User File Link Routes  /////////////////////////////////////////
14
-Route::prefix('file-links')->name('userLink.')->group(function()
15
-{
14
+Route::prefix('file-links')->name('userLink.')->group(function() {
16 15
     Route::get('download-all/{link}', 'UserLinksController@downloadAllFiles')->name('downloadAll');
17 16
     Route::post('details/{link}', 'UserLinksController@uploadFiles')->name('upload');
18 17
     Route::get('details/{link}', 'UserLinksController@details')->name('details');
@@ -23,11 +22,9 @@  discard block
 block discarded – undo
23 22
 Route::get('account/change-password', 'AccountController@changePassword')->name('changePassword');
24 23
 Route::post('account/change-password', 'AccountController@submitPassword')->name('submitPassword');
25 24
 
26
-Route::middleware(['password_expired'])->group(function () 
27
-{ 
25
+Route::middleware(['password_expired'])->group(function () {
28 26
     //  Tech/Registered User Routes
29
-    Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function()
30
-    {
27
+    Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() {
31 28
         ///////////////////////////  Basic User Routes  /////////////////////////////////////////
32 29
         Route::get('about', 'PagesController@about')->name('about');
33 30
         Route::get('account', 'AccountController@index')->name('account');
@@ -36,8 +33,7 @@  discard block
 block discarded – undo
36 33
         Route::get('mark-notification/{id}', 'DashboardController@markNotification')->name('mark-notification');
37 34
 
38 35
         //////////////////////////  System Routes  ////////////////////////////////////////////
39
-        Route::prefix('system')->name('system.')->group(function()
40
-        {
36
+        Route::prefix('system')->name('system.')->group(function() {
41 37
             Route::get('sys-fields/{id}', 'SystemController@fields')->name('sysFields');
42 38
             Route::post('files/replace/{id}', 'SystemFilesController@replace')->name('files.replace');
43 39
             Route::get('files/replace/{id}', 'SystemFilesController@replaceForm')->name('files.replaceForm');
@@ -49,8 +45,7 @@  discard block
 block discarded – undo
49 45
         });
50 46
 
51 47
         //////////////////////////  Customer Routes  ////////////////////////////////////////////
52
-        Route::prefix('customer')->name('customer.')->group(function()
53
-        {
48
+        Route::prefix('customer')->name('customer.')->group(function() {
54 49
             Route::get('download-note/{id}', 'CustomerController@generatePDF')->name('downloadNote');
55 50
             Route::get('fav/{action}/{id}', 'CustomerController@toggleFav')->name('toggleFav');
56 51
             Route::resource('files', 'CustomerFilesController');
@@ -67,8 +62,7 @@  discard block
 block discarded – undo
67 62
         });
68 63
 
69 64
         //////////////////////////  Tech Tips Routes  //////////////////////////////////////////
70
-        Route::prefix('tip')->name('tip.')->group(function()
71
-        {
65
+        Route::prefix('tip')->name('tip.')->group(function() {
72 66
             Route::get('download-note/{id}', 'TechTipsController@generatePDF')->name('downloadTip');
73 67
             Route::post('upload-image', 'TechTipsController@processImage')->name('processImage');
74 68
             Route::get('fav/{action}/{id}', 'TechTipsController@toggleFav')->name('toggleFav');
@@ -80,8 +74,7 @@  discard block
 block discarded – undo
80 74
         });
81 75
 
82 76
         //////////////////////////  File Links Routes  //////////////////////////////////////////
83
-        Route::prefix('links')->name('links.')->group(function()
84
-        {
77
+        Route::prefix('links')->name('links.')->group(function() {
85 78
             Route::get('download-all/{id}', 'FileLinksController@downloadAllFiles')->name('downloadAll');
86 79
             Route::post('addFile/{id}', 'FileLinksController@submitAddFile')->name('submitAdd');
87 80
             Route::get('addFile/{id}', 'FileLinksController@addFileForm')->name('addFile');
@@ -95,10 +88,8 @@  discard block
 block discarded – undo
95 88
     });
96 89
 
97 90
     //  Administration Routes
98
-    Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function()
99
-    {
100
-        Route::prefix('admin')->name('admin.')->group(function()
101
-        {
91
+    Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() {
92
+        Route::prefix('admin')->name('admin.')->group(function() {
102 93
             Route::get('links/show/{id}', 'AdminController@showLinks')->name('showLinks');
103 94
             Route::get('links', 'AdminController@links')->name('links');
104 95
             Route::post('resetPass/{id}', 'UserController@resetPassword')->name('resetPass');
@@ -109,10 +100,8 @@  discard block
 block discarded – undo
109 100
     });
110 101
 
111 102
     //  Installer Routes
112
-    Route::group(['middleware' => 'roles', 'roles' => ['installer']], function()
113
-    {
114
-        Route::prefix('installer')->name('installer.')->group(function()
115
-        {
103
+    Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() {
104
+        Route::prefix('installer')->name('installer.')->group(function() {
116 105
             ///////////////////////  Systems and Categories Routes  //////////////////////////////
117 106
             Route::resource('system-categories', 'SystemCategoriesController');
118 107
             Route::get('systems/new/{cat}', 'SystemTypesController@newSys')->name('newSys');
Please login to merge, or discard this patch.
app/Console/Commands/DatabaseCheck.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
     
134 134
     //  Print the output to the screen and write for PDF report
135 135
     private function output($data)
136
-    {   
136
+    {
137 137
         foreach($data as $d)
138 138
         {
139 139
             //  Console Output
Please login to merge, or discard this patch.
app/Http/Controllers/TechTipsController.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
         if(!empty($request->system))
64 64
         {
65 65
             $tipData = TechTips::where('subject', 'like', '%'.$request->tipSearch.'%')
66
-                ->whereHas('TechTipSystems', function($q) use($request)
67
-                {
66
+                ->whereHas('TechTipSystems', function($q) use($request) {
68 67
                    $q->where('sys_id', $request->system);
69 68
                 })
70 69
                 ->get();
@@ -118,14 +117,15 @@  discard block
 block discarded – undo
118 117
             $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request));
119 118
 
120 119
             // check if the upload is success, throw exception or return response you need
121
-            if ($receiver->isUploaded() === false) {
120
+            if ($receiver->isUploaded() === false)
121
+            {
122 122
                 throw new UploadMissingFileException();
123 123
             }
124 124
 
125 125
             // receive the file
126 126
             $save = $receiver->receive();
127 127
             
128
-            if ($save->isFinished()) 
128
+            if ($save->isFinished())
129 129
             {
130 130
                 $tipID = $this->createNewTechTip($request);
131 131
                 $filePath = config('filesystems.paths.tips').DIRECTORY_SEPARATOR.$tipID;
Please login to merge, or discard this patch.
app/Http/Controllers/BackupController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     
19 19
     //  Backup landing page
20 20
     public function index()
21
-    {        
21
+    {
22 22
         return view('installer.backupIndex');
23 23
     }
24 24
     
Please login to merge, or discard this patch.