Completed
Push — develop ( a137c5...39805a )
by Tony
23:48 queued 09:25
created
app/Settings.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
                 if (!empty($key)) {
70 70
                     if (is_string($k) && !str_contains($k, '.') && DbConfig::exactKey($key)->exists() && DbConfig::key($key)->count() == 1) {
71 71
                         // check that we aren't trying to set an array onto an existing value only setting
72
-                        throw new \Exception("Attempting to set array value to existing non-array value at the key '" . $key . "'");
72
+                        throw new \Exception("Attempting to set array value to existing non-array value at the key '".$key."'");
73 73
                     }
74 74
                     else {
75 75
                         // we are not at the leaf yet, add this chunk to the key and recurse
76
-                        $this->set($key . '.' . $k, $v);
76
+                        $this->set($key.'.'.$k, $v);
77 77
                     }
78 78
                 }
79 79
                 else {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         else {
86 86
             // make sure we can save this
87 87
             if ($this->isReadOnly($key)) {
88
-                throw new \Exception("The setting '" . $key . "' is read only");
88
+                throw new \Exception("The setting '".$key."' is read only");
89 89
             }
90 90
 
91 91
             // flush the cache and save the value in db and cache
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
     public function get($key, $default = null)
107 107
     {
108 108
         // return value from cache or fetch it and return it
109
-        return Cache::tags(self::$cache_tag)->remember($key, $this->cache_time, function () use ($key, $default) {
109
+        return Cache::tags(self::$cache_tag)->remember($key, $this->cache_time, function() use ($key, $default) {
110 110
             // fetch the value from config.php first
111
-            if (Config::has('config.' . $key)) {
112
-                $config_data = Config::get('config.' . $key, $default);
111
+            if (Config::has('config.'.$key)) {
112
+                $config_data = Config::get('config.'.$key, $default);
113 113
                 if (!is_array($config_data)) {
114 114
                     // return the value from config.php if it is a value
115 115
                     return $config_data;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function has($key)
177 177
     {
178
-        return (Cache::tags(self::$cache_tag)->has($key) || Config::has('config.' . $key) || DbConfig::key($key)->exists());
178
+        return (Cache::tags(self::$cache_tag)->has($key) || Config::has('config.'.$key) || DbConfig::key($key)->exists());
179 179
     }
180 180
 
181 181
     /**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public function isReadOnly($key)
188 188
     {
189
-        return Config::has('config.' . $key);
189
+        return Config::has('config.'.$key);
190 190
     }
191 191
 
192 192
     /**
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
      * Forget a key and all children
195 195
      * This cannot forget variables set in config.php
196 196
      *
197
-     * @param $key string Explicit key to forget
197
+     * @param string $key string Explicit key to forget
198 198
      */
199 199
     public function forget($key)
200 200
     {
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
         if (Auth::guard($guard)->guest()) {
21 21
             if ($request->ajax() || $request->wantsJson()) {
22 22
                 return response('Unauthorized.', 401);
23
-            } else {
23
+            }
24
+            else {
24 25
                 return redirect()->guest('login');
25 26
             }
26 27
         }
Please login to merge, or discard this patch.
app/Console/Commands/DeleteUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public function handle()
63 63
     {
64 64
         $user = $this->argument('user');
65
-        $user_list = User::select('username')->where('username', 'like', '%' . $user . '%')->orWhere('realname', 'like', '%' . $user . '%')->get();
65
+        $user_list = User::select('username')->where('username', 'like', '%'.$user.'%')->orWhere('realname', 'like', '%'.$user.'%')->get();
66 66
         $names = [];
67 67
 
68 68
         if (count($user_list) < 1) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         else {
79 79
             $name = $names[0];
80 80
         }
81
-        if ($this->confirm('Do you wish to remove ' . $name . '?')) {
81
+        if ($this->confirm('Do you wish to remove '.$name.'?')) {
82 82
             User::where('username', $name)->delete();
83 83
             $this->info('User deleted.');
84 84
         }
Please login to merge, or discard this patch.
app/Http/Middleware/SetViewVariable.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 namespace App\Http\Middleware;
3 3
 
4 4
 use Closure;
5
-use Illuminate\Contracts\Auth\Guard;
6 5
 use Dingo\Api\Http;
7 6
 use Dingo\Api\Routing\Helpers;
7
+use Illuminate\Contracts\Auth\Guard;
8 8
 use Illuminate\Http\Request;
9 9
 
10 10
 class SetViewVariable
Please login to merge, or discard this patch.