Test Failed
Push — dev5 ( 6a960f...113ec3 )
by Ron
16:42
created
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/Policies/GatePolicy.php 1 patch
Spacing   +5 added lines, -5 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() ? 'false' : 'true';
57
-        Log::debug('User ' . $user->full_name . ' is trying to access admin link.  Result - ' . $allow);
57
+        Log::debug('User '.$user->full_name.' is trying to access 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,7 +77,7 @@  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);
80
+        Log::debug('User '.$user->full_name.' is trying to access '.$task.'.  Result - '.$allow);
81 81
 
82 82
         return  $data->isEmpty() ? false : true;
83 83
     }
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.
app/Console/Commands/backupRun.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         //  Create the archive and place the version file in it
80 80
         $this->zip = Zip::create(config('filesystems.disks.backup.root').DIRECTORY_SEPARATOR.$backupName);
81 81
         $this->bar->advance();
82
-        $this->zip->add(config('filesystems.disks.backup.root') . DIRECTORY_SEPARATOR . 'version.txt');
82
+        $this->zip->add(config('filesystems.disks.backup.root').DIRECTORY_SEPARATOR.'version.txt');
83 83
         $this->bar->advance();
84 84
         $this->zip->add(base_path().DIRECTORY_SEPARATOR.'.env');
85 85
         $this->bar->advance();
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
         'mysqldump tb-dev5-data -u root');
114 114
         $process->run();
115 115
 
116
-        File::put(config('filesystems.disks.backup.root') . DIRECTORY_SEPARATOR . 'database.sql', $process->getOutput());
116
+        File::put(config('filesystems.disks.backup.root').DIRECTORY_SEPARATOR.'database.sql', $process->getOutput());
117 117
         $this->bar->advance();
118
-        $this->zip->add(config('filesystems.disks.backup.root') . DIRECTORY_SEPARATOR . 'database.sql');
118
+        $this->zip->add(config('filesystems.disks.backup.root').DIRECTORY_SEPARATOR.'database.sql');
119 119
         $this->bar->advance();
120 120
     }
121 121
 
Please login to merge, or discard this patch.
app/Console/Commands/updateRun.php 2 patches
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@  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
             //  Open up the file and verify it is at least the same version as the current setup
27 27
             $valid = $this->openUpdate($updateFile);
28 28
 
29
-            if ($valid)
29
+            if($valid)
30 30
             {
31 31
                 $this->call('down');
32 32
                 $this->copyFiles($updateFile);
@@ -48,26 +48,26 @@  discard block
 block discarded – undo
48 48
         $updates    = Storage::disk('staging')->files('updates');
49 49
 
50 50
         //  Cycle through each file in the update directory to see if they are update files
51
-        foreach ($updates as $update)
51
+        foreach($updates as $update)
52 52
         {
53 53
             $baseName = explode('/', $update)[1];
54 54
 
55 55
             //  Verify the file is in the .zip format
56 56
             $fileParts = pathinfo($baseName);
57
-            if ($fileParts['extension'] == 'zip')
57
+            if($fileParts['extension'] == 'zip')
58 58
             {
59 59
                 //  Verify this is actually an update file
60
-                $zip = Zip::open(config('filesystems.disks.staging.root') .
61
-                    DIRECTORY_SEPARATOR . 'updates' . DIRECTORY_SEPARATOR . $baseName);
60
+                $zip = Zip::open(config('filesystems.disks.staging.root').
61
+                    DIRECTORY_SEPARATOR.'updates'.DIRECTORY_SEPARATOR.$baseName);
62 62
                 $files = $zip->listFiles();
63
-                if (in_array($fileParts['filename'] . '/config/version.yml', $files))
63
+                if(in_array($fileParts['filename'].'/config/version.yml', $files))
64 64
                 {
65 65
                     $updateList[] = $baseName;
66 66
                 }
67 67
             }
68 68
         }
69 69
 
70
-        if (empty($updateList))
70
+        if(empty($updateList))
71 71
         {
72 72
             $this->error('No updates have been loaded to the system');
73 73
             $this->error('Please upload update package to the Storage/Staging/Updates folder');
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         //  Determine if there is more than one update that can be applied
78
-        if (count($updateList) > 1)
78
+        if(count($updateList) > 1)
79 79
         {
80 80
             $this->line('');
81 81
 
82 82
             $anticipate = [];
83
-            foreach ($updateList as $key => $up) {
83
+            foreach($updateList as $key => $up) {
84 84
                 $opt = $key + 1;
85 85
                 $anticipate[$opt] = $up;
86
-                $this->line('[' . $opt . '] ' . $up);
86
+                $this->line('['.$opt.'] '.$up);
87 87
             }
88 88
             $updateFile = $this->choice('Please select which update you would like to load', $anticipate);
89 89
         }
@@ -101,21 +101,21 @@  discard block
 block discarded – undo
101 101
         $fileParts = pathinfo($file);
102 102
         $folder = $fileParts['filename'];
103 103
 
104
-        $zip = Zip::open(config('filesystems.disks.staging.root') .
105
-            DIRECTORY_SEPARATOR . 'updates' . DIRECTORY_SEPARATOR . $file);
104
+        $zip = Zip::open(config('filesystems.disks.staging.root').
105
+            DIRECTORY_SEPARATOR.'updates'.DIRECTORY_SEPARATOR.$file);
106 106
 
107
-        $zip->extract(config('filesystems.disks.staging.root') .
108
-            DIRECTORY_SEPARATOR . 'updates' . DIRECTORY_SEPARATOR . 'tmp');
107
+        $zip->extract(config('filesystems.disks.staging.root').
108
+            DIRECTORY_SEPARATOR.'updates'.DIRECTORY_SEPARATOR.'tmp');
109 109
         $zip->close();
110 110
 
111
-        $verFile = fopen(config('filesystems.disks.staging.root') .
112
-            DIRECTORY_SEPARATOR . 'updates' . DIRECTORY_SEPARATOR . 'tmp' .
113
-            DIRECTORY_SEPARATOR . $folder . DIRECTORY_SEPARATOR . 'config' .
114
-            DIRECTORY_SEPARATOR . 'version.yml', 'r');
111
+        $verFile = fopen(config('filesystems.disks.staging.root').
112
+            DIRECTORY_SEPARATOR.'updates'.DIRECTORY_SEPARATOR.'tmp'.
113
+            DIRECTORY_SEPARATOR.$folder.DIRECTORY_SEPARATOR.'config'.
114
+            DIRECTORY_SEPARATOR.'version.yml', 'r');
115 115
 
116 116
         $verData = [];
117 117
         $i = 0;
118
-        while (!feof(
118
+        while(!feof(
119 119
         /** @scrutinizer ignore-type */
120 120
         $verFile))
121 121
         {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             $verFile);
125 125
             $data = explode(':', $line);
126 126
 
127
-            if (($data[0] === '  major' || $data[0] === '  minor' || $data[0] === '  patch') && $i < 3)
127
+            if(($data[0] === '  major' || $data[0] === '  minor' || $data[0] === '  patch') && $i < 3)
128 128
             {
129 129
                 $verData[trim($data[0])] = trim($data[1]);
130 130
                 $i++;
@@ -134,15 +134,15 @@  discard block
 block discarded – undo
134 134
         $curVersion = new \PragmaRX\Version\Package\Version();
135 135
 
136 136
         $valid = false;
137
-        if ($verData['major'] > $curVersion->major())
137
+        if($verData['major'] > $curVersion->major())
138 138
         {
139 139
             $valid = true;
140 140
         }
141
-        else if ($verData['minor'] > $curVersion->minor())
141
+        else if($verData['minor'] > $curVersion->minor())
142 142
         {
143 143
             $valid = true;
144 144
         }
145
-        else if ($verData['patch'] >= $curVersion->patch())
145
+        else if($verData['patch'] >= $curVersion->patch())
146 146
         {
147 147
             $valid = true;
148 148
         }
@@ -156,24 +156,24 @@  discard block
 block discarded – undo
156 156
         $fileParts = pathinfo($updateFile);
157 157
         $folder = $fileParts['filename'];
158 158
 
159
-        $updateFile = config('filesystems.disks.staging.root') .
160
-            DIRECTORY_SEPARATOR . 'updates' . DIRECTORY_SEPARATOR . 'tmp' .
161
-            DIRECTORY_SEPARATOR . $folder . DIRECTORY_SEPARATOR;
159
+        $updateFile = config('filesystems.disks.staging.root').
160
+            DIRECTORY_SEPARATOR.'updates'.DIRECTORY_SEPARATOR.'tmp'.
161
+            DIRECTORY_SEPARATOR.$folder.DIRECTORY_SEPARATOR;
162 162
 
163 163
         // Copy files
164
-        File::copyDirectory($updateFile . 'app',       base_path() . DIRECTORY_SEPARATOR . 'app');
165
-        File::copyDirectory($updateFile . 'bootstrap', base_path() . DIRECTORY_SEPARATOR . 'bootstrap');
166
-        File::copyDirectory($updateFile . 'config',    base_path() . DIRECTORY_SEPARATOR . 'config');
167
-        File::copyDirectory($updateFile . 'database',  base_path() . DIRECTORY_SEPARATOR . 'database');
168
-        File::copyDirectory($updateFile . 'resources', base_path() . DIRECTORY_SEPARATOR . 'resources');
169
-        File::copyDirectory($updateFile . 'routes',    base_path() . DIRECTORY_SEPARATOR . 'routes');
164
+        File::copyDirectory($updateFile.'app', base_path().DIRECTORY_SEPARATOR.'app');
165
+        File::copyDirectory($updateFile.'bootstrap', base_path().DIRECTORY_SEPARATOR.'bootstrap');
166
+        File::copyDirectory($updateFile.'config', base_path().DIRECTORY_SEPARATOR.'config');
167
+        File::copyDirectory($updateFile.'database', base_path().DIRECTORY_SEPARATOR.'database');
168
+        File::copyDirectory($updateFile.'resources', base_path().DIRECTORY_SEPARATOR.'resources');
169
+        File::copyDirectory($updateFile.'routes', base_path().DIRECTORY_SEPARATOR.'routes');
170 170
 
171 171
         //  Run Composer Updates
172
-        exec('cd ' . base_path() . ' && composer install --no-dev --no-interaction --optimize-autoloader --no-ansi > /dev/null 2>&1');
172
+        exec('cd '.base_path().' && composer install --no-dev --no-interaction --optimize-autoloader --no-ansi > /dev/null 2>&1');
173 173
         $this->call('ziggy:generate');
174 174
         //  Run NPM
175
-        exec('cd ' . base_path() . ' && npm install --only=production > /dev/null 2>&1');
176
-        exec('cd ' . base_path() . ' && npm run production > /dev/null 2>&1');
175
+        exec('cd '.base_path().' && npm install --only=production > /dev/null 2>&1');
176
+        exec('cd '.base_path().' && npm run production > /dev/null 2>&1');
177 177
 
178 178
         //  Update the database
179 179
         $this->call('migrate', ['--force' => 'default']);
Please login to merge, or discard this 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/Console/Commands/backupRestore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
         /** @scrutinizer ignore-type */
93 93
         $this->argument('filename'));
94 94
         $this->baseName = $fileParts['filename'];
95
-        $this->archive = Zip::open(config('filesystems.disks.backup.root') . DIRECTORY_SEPARATOR .
95
+        $this->archive = Zip::open(config('filesystems.disks.backup.root').DIRECTORY_SEPARATOR.
96 96
         /** @scrutinizer ignore-type */
97 97
         $this->argument('filename'));
98 98
         // if (!$this->archive->has('version.txt')) {
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminController.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     //  Admin landing page
27 27
     public function index()
28 28
     {
29
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
29
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
30 30
         return view('admin.index');
31 31
     }
32 32
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                             ->makeVisible('user_id')
46 46
                     );
47 47
 
48
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
48
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
49 49
         Log::debug('User Collection Data:', $userLinks->toArray());
50 50
         return view('admin.userLinks', [
51 51
             'links' => $userLinks,
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $user = User::find($id);
59 59
 
60
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
60
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
61 61
         Log::debug('User Link Data:', $user->toArray());
62 62
         return view('admin.linkDetails', [
63 63
             'user' => $user,
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function passwordPolicy()
69 69
     {
70 70
         $this->authorize('hasAccess', 'Manage Users');
71
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
71
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
72 72
         return view('admin.userSecurity', [
73 73
             'passExpire' => config('auth.passwords.settings.expire'),
74 74
         ]);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     //  Submit the form to change the user password policy
78 78
     public function submitPolicy(Request $request)
79 79
     {
80
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data:', $request->toArray());
80
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data:', $request->toArray());
81 81
         $this->authorize('hasAccess', 'Manage Users');
82 82
 
83 83
         $request->validate([
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         Log::notice('User '.Auth::user()->full_name.' updated User Password Policy');
92 92
 
93 93
         //  If the setting is changing from never to xx days, update all users
94
-        if ($request->passExpire == 0) {
94
+        if($request->passExpire == 0) {
95 95
             User::whereNotNull('password_expires')->update([
96 96
                 'password_expires' => null
97 97
             ]);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function roleSettings()
112 112
     {
113 113
         $this->authorize('hasAccess', 'Manage User Roles');
114
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
114
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
115 115
         $roles = UserRoleType::with(['UserRolePermissions' => function($query)
116 116
         {
117 117
             $query->join('user_role_permission_types', 'user_role_permission_types.perm_type_id', '=', 'user_role_permissions.perm_type_id');
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
     public function submitRoleSettings(Request $request)
130 130
     {
131
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data: ', $request->toArray());
131
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data: ', $request->toArray());
132 132
         $this->authorize('hasAccess', 'Manage User Roles');
133 133
 
134 134
         $request->validate([
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
             'name'        => $request->name,
167 167
             'description' => $request->description,
168 168
         ]);
169
-        foreach ($request->permissions as $perm)
169
+        foreach($request->permissions as $perm)
170 170
         {
171 171
             UserRolePermissions::create([
172 172
                 'role_id'      => $role->role_id,
Please login to merge, or discard this patch.
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
         $userLinks = new UserCollection(
37 37
                         User::withCount([
38 38
                                 'FileLinks',
39
-                                'FileLinks as expired_file_links_count' => function($query)
40
-                                {
39
+                                'FileLinks as expired_file_links_count' => function($query) {
41 40
                                     $query->where('expire', '<', Carbon::now());
42 41
                                 }
43 42
                             ])
@@ -91,7 +90,8 @@  discard block
 block discarded – undo
91 90
         Log::notice('User '.Auth::user()->full_name.' updated User Password Policy');
92 91
 
93 92
         //  If the setting is changing from never to xx days, update all users
94
-        if ($request->passExpire == 0) {
93
+        if ($request->passExpire == 0)
94
+        {
95 95
             User::whereNotNull('password_expires')->update([
96 96
                 'password_expires' => null
97 97
             ]);
@@ -112,8 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $this->authorize('hasAccess', 'Manage User Roles');
114 114
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
115
-        $roles = UserRoleType::with(['UserRolePermissions' => function($query)
116
-        {
115
+        $roles = UserRoleType::with(['UserRolePermissions' => function($query) {
117 116
             $query->join('user_role_permission_types', 'user_role_permission_types.perm_type_id', '=', 'user_role_permissions.perm_type_id');
118 117
         }])->get();
119 118
         $perms = UserRolePermissionTypes::all();
Please login to merge, or discard this patch.