GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — develop (#145)
by
unknown
09:16 queued 03:08
created
application/mailers/CronMailer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
     public function __construct()
9 9
     {
10
-        $this->from = [ config_item('site.auth_email'), config_item('site.name') ];
10
+        $this->from = [config_item('site.auth_email'), config_item('site.name')];
11 11
         $this->to   = config_item('site.auth_email');
12 12
     }
13 13
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      *
19 19
      * @param $output
20 20
      */
21
-    public function results($output=null)
21
+    public function results($output = null)
22 22
     {
23 23
         $data = [
24 24
             'output' => $output,
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         ];
27 27
 
28 28
         // Send it immediately - don't queue.
29
-        return $this->send($this->to, "Cron Results from ". config_item('site.name'), $data);
29
+        return $this->send($this->to, "Cron Results from ".config_item('site.name'), $data);
30 30
     }
31 31
 
32 32
     //--------------------------------------------------------------------
Please login to merge, or discard this patch.
application/mailers/UserMailer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
     public function __construct()
9 9
     {
10
-        $this->from = [ config_item('site.auth_email'), config_item('site.name') ];
10
+        $this->from = [config_item('site.auth_email'), config_item('site.name')];
11 11
     }
12 12
 
13 13
     //--------------------------------------------------------------------
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
      * @param $params
24 24
      * @return bool
25 25
      */
26
-    public function didRegister($params=null)
26
+    public function didRegister($params = null)
27 27
     {
28 28
         $data = [
29 29
             'user_id'   => $params['user_id'],
30 30
             'email'     => $params['email'],
31
-            'link'      => site_url( \Myth\Route::named('activate_user') ),
31
+            'link'      => site_url(\Myth\Route::named('activate_user')),
32 32
             'token'     => $params['token'],
33 33
             'site_name' => config_item('site.name'),
34 34
             'site_link' => site_url()
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $data = [
53 53
             'email' => $user['email'],
54 54
             'code'  => $token,
55
-            'link'  => site_url( \Myth\Route::named('reset_pass') ),
55
+            'link'  => site_url(\Myth\Route::named('reset_pass')),
56 56
             'site_name' => config_item('site.name'),
57 57
             'site_link' => site_url()
58 58
         ];
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $data = [
75 75
             'email' => $user['email'],
76
-            'link'  => site_url( \Myth\Route::named('forgot_pass') ),
76
+            'link'  => site_url(\Myth\Route::named('forgot_pass')),
77 77
             'site_name' => config_item('site.name'),
78 78
             'site_link' => site_url()
79 79
         ];
Please login to merge, or discard this patch.
application/models/User_model.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 
137 137
         // If it's an update, we probably won't have the username/email
138 138
         // so grab it so that we can use it.
139
-        if (! empty($data[ $this->primary_key ]))
139
+        if ( ! empty($data[$this->primary_key]))
140 140
         {
141
-            if (! isset($data[$field]) )
141
+            if ( ! isset($data[$field]))
142 142
             {
143
-                $value = $this->get_field( $data['id'], $field );
143
+                $value = $this->get_field($data['id'], $field);
144 144
             }
145 145
         }
146 146
         // However, if it's an insert, then we should have it, If we don't, leave.
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
         }
156 156
 
157 157
         // Still here? then create the hash based on the current realm.
158
-        if (! empty($data['password']) )
158
+        if ( ! empty($data['password']))
159 159
         {
160
-            $key = md5($value .':'. config_item('api.realm') .':'. $data['password']);
160
+            $key = md5($value.':'.config_item('api.realm').':'.$data['password']);
161 161
             $data['api_key'] = $key;
162 162
         }
163 163
 
@@ -228,20 +228,20 @@  discard block
 block discarded – undo
228 228
      *
229 229
      * @return object
230 230
      */
231
-    public function saveMetaToUser($user_id, $key, $value=null)
231
+    public function saveMetaToUser($user_id, $key, $value = null)
232 232
     {
233
-        if (! Events::trigger('beforeAddMetaToUser', [$user_id, $key]))
233
+        if ( ! Events::trigger('beforeAddMetaToUser', [$user_id, $key]))
234 234
         {
235 235
             return false;
236 236
         }
237 237
 
238
-        $user_id = (int)$user_id;
238
+        $user_id = (int) $user_id;
239 239
 
240 240
         // Does this key already exist?
241
-        $test = $this->db->where([ 'user_id' => $user_id, 'meta_key' => $key ])->get('user_meta');
241
+        $test = $this->db->where(['user_id' => $user_id, 'meta_key' => $key])->get('user_meta');
242 242
 
243 243
         // Doesn't exist, so insert it.
244
-        if (! $test->num_rows())
244
+        if ( ! $test->num_rows())
245 245
         {
246 246
             $data = [
247 247
                 'user_id'       => $user_id,
@@ -271,12 +271,12 @@  discard block
 block discarded – undo
271 271
      */
272 272
     public function getMetaItem($user_id, $key)
273 273
     {
274
-        $query = $this->db->where('user_id', (int)$user_id)
274
+        $query = $this->db->where('user_id', (int) $user_id)
275 275
                           ->where('meta_key', $key)
276 276
                           ->select('meta_value')
277 277
                           ->get('user_meta');
278 278
 
279
-        if (! $query->num_rows())
279
+        if ( ! $query->num_rows())
280 280
         {
281 281
             return null;
282 282
         }
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      */
297 297
     public function removeMetaFromUser($user_id, $key)
298 298
     {
299
-        if (! Events::trigger('beforeRemoveMetaFromUser', [$user_id, $key]))
299
+        if ( ! Events::trigger('beforeRemoveMetaFromUser', [$user_id, $key]))
300 300
         {
301 301
             return false;
302 302
         }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 		    $this->db->where('meta_key', $key);
311 311
 	    }
312 312
 
313
-        $this->db->where('user_id', (int)$user_id)
313
+        $this->db->where('user_id', (int) $user_id)
314 314
                  ->delete('user_meta');
315 315
     }
316 316
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
     public function getMetaForUser($user_id)
320 320
     {
321
-        $query = $this->db->where('user_id', (int)$user_id)
321
+        $query = $this->db->where('user_id', (int) $user_id)
322 322
                           ->select('meta_key, meta_value')
323 323
                           ->get('user_meta');
324 324
 
@@ -328,9 +328,9 @@  discard block
 block discarded – undo
328 328
 
329 329
         if (count($rows))
330 330
         {
331
-            array_walk( $rows, function ( $row ) use ( &$meta )
331
+            array_walk($rows, function($row) use (&$meta)
332 332
             {
333
-                $meta[ $row->meta_key ] = $row->meta_value;
333
+                $meta[$row->meta_key] = $row->meta_value;
334 334
             } );
335 335
         }
336 336
 
@@ -350,11 +350,11 @@  discard block
 block discarded – undo
350 350
 
351 351
         if (is_object($data['fields']))
352 352
         {
353
-            $data['fields']->meta = (object)$meta;
353
+            $data['fields']->meta = (object) $meta;
354 354
         }
355 355
         else
356 356
         {
357
-            $data['fields']['meta']= $meta;
357
+            $data['fields']['meta'] = $meta;
358 358
         }
359 359
 
360 360
         return $data;
Please login to merge, or discard this patch.
application/third_party/HMVC/Loader.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
  *
30 30
  */
31 31
 
32
-if (!defined("BASEPATH"))
32
+if ( ! defined("BASEPATH"))
33 33
     exit("No direct script access allowed");
34 34
 
35 35
 class HMVC_Loader extends CI_Loader {
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
     public function controller($uri, $params = array(), $return = FALSE) {
79 79
         // No valid module detected, add current module to uri
80 80
         list($module) = $this->detect_module($uri);
81
-        if (!isset($module)) {
81
+        if ( ! isset($module)) {
82 82
             $router = & $this->_ci_get_component('router');
83 83
             if ($router->module) {
84 84
                 $module = $router->module;
85
-                $uri = $module . '/' . $uri;
85
+                $uri = $module.'/'.$uri;
86 86
             }
87 87
         }
88 88
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     {
200 200
         // Allow application/views/* to override any module
201 201
         // views for easier app customization.
202
-        if (file_exists(APPPATH .'views/'. $view .'.php'))
202
+        if (file_exists(APPPATH.'views/'.$view.'.php'))
203 203
         {
204 204
             return parent::view($view, $vars, $return);
205 205
         }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
             $void = $this->widget($module.'/'.$widget);
360 360
 
361 361
             // Remove module if widget not found within it
362
-            if (!$void) {
362
+            if ( ! $void) {
363 363
                 $this->remove_module();
364 364
             }
365 365
 
@@ -440,13 +440,13 @@  discard block
 block discarded – undo
440 440
         $method = isset($segments[1]) ? $segments[1] : "index";
441 441
 
442 442
         // Controller not found
443
-        if (!$class) {
443
+        if ( ! $class) {
444 444
             return;
445 445
         }
446 446
 
447
-        if (!array_key_exists(strtolower($class), $this->_ci_controllers)) {
447
+        if ( ! array_key_exists(strtolower($class), $this->_ci_controllers)) {
448 448
             // Determine filepath
449
-            $filepath = APPPATH . 'controllers/' . $router->fetch_directory() . $class . '.php';
449
+            $filepath = APPPATH.'controllers/'.$router->fetch_directory().$class.'.php';
450 450
 
451 451
             // Load the controller file
452 452
             if (file_exists($filepath)) {
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
             }
455 455
 
456 456
             // Controller class not found, show 404
457
-            if (!class_exists($class)) {
457
+            if ( ! class_exists($class)) {
458 458
                 show_404("{$class}/{$method}");
459 459
             }
460 460
 
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
         $controller = $this->_ci_controllers[strtolower($class)];
466 466
 
467 467
         // Method does not exists
468
-        if (!method_exists($controller, $method)) {
468
+        if ( ! method_exists($controller, $method)) {
469 469
             show_404("{$class}/{$method}");
470 470
         }
471 471
 
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 
525 525
         // Check all locations for this module
526 526
         foreach ($config->item('modules_locations') as $location) {
527
-            $path = $location . rtrim($module, '/') . '/';
527
+            $path = $location.rtrim($module, '/').'/';
528 528
             if (is_dir($path)) {
529 529
                 return $path;
530 530
             }
Please login to merge, or discard this patch.
application/third_party/HMVC/Router.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
  * THE SOFTWARE.
34 34
  */
35 35
 
36
-if (!defined("BASEPATH"))
36
+if ( ! defined("BASEPATH"))
37 37
     exit("No direct script access allowed");
38 38
 
39 39
 class HMVC_Router extends CI_Router {
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
      */
54 54
     function __construct() {
55 55
 
56
-        $this->config =& load_class('Config', 'core');
56
+        $this->config = & load_class('Config', 'core');
57 57
 
58 58
         // Process 'modules_locations' from config
59 59
         $locations = $this->config->item('modules_locations');
60 60
 
61
-        if (!$locations) {
62
-            $locations = array(APPPATH . 'modules/');
63
-        } else if (!is_array($locations)) {
61
+        if ( ! $locations) {
62
+            $locations = array(APPPATH.'modules/');
63
+        } else if ( ! is_array($locations)) {
64 64
             $locations = array($locations);
65 65
         }
66 66
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         foreach ($locations as &$location) {
69 69
             $location = realpath($location);
70 70
             $location = str_replace('\\', '/', $location);
71
-            $location = rtrim($location, '/') . '/';
71
+            $location = rtrim($location, '/').'/';
72 72
         }
73 73
 
74 74
         $this->config->set_item('modules_locations', $locations);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         }
97 97
 
98 98
         // Is there a 404 override?
99
-        if (!empty($this->routes['404_override'])) {
99
+        if ( ! empty($this->routes['404_override'])) {
100 100
             $segments = explode('/', $this->routes['404_override']);
101 101
             if ($located = $this->locate($segments)) {
102 102
                 return $located;
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
         // Apply the current module's routing config
126 126
 
127 127
         // CI v3.x has URI starting at segment 1
128
-        $segstart = (intval(substr(CI_VERSION,0,1)) > 2) ? 1 : 0;
128
+        $segstart = (intval(substr(CI_VERSION, 0, 1)) > 2) ? 1 : 0;
129 129
 
130 130
         if ($module = $this->uri->segment($segstart)) {
131 131
             foreach ($this->config->item('modules_locations') as $location) {
132
-                if (is_file($file = $location . $module . '/config/routes.php')) {
132
+                if (is_file($file = $location.$module.'/config/routes.php')) {
133 133
                     include ($file);
134 134
 
135
-                    $route = (!isset($route) or !is_array($route)) ? array() : $route;
135
+                    $route = ( ! isset($route) or ! is_array($route)) ? array() : $route;
136 136
                     $this->routes = array_merge($this->routes, $route);
137 137
                     unset($route);
138 138
                 }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     function locate($segments) {
153 153
         // anon function to ucfirst a string if CI ver > 2 (for backwards compatibility)
154
-        $_ucfirst = function($cn) {return (intval(substr(CI_VERSION,0,1)) > 2) ? ucfirst($cn) : $cn;};
154
+        $_ucfirst = function($cn) {return (intval(substr(CI_VERSION, 0, 1)) > 2) ? ucfirst($cn) : $cn; };
155 155
 
156 156
         list($module, $directory, $controller) = array_pad($segments, 3, NULL);
157 157
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 $this->set_directory(array_shift($s), TRUE);
171 171
                 continue;
172 172
             }
173
-            elseif (file_exists(APPPATH .'controllers/'. $test .'.php'))
173
+            elseif (file_exists(APPPATH.'controllers/'.$test.'.php'))
174 174
             {
175 175
                 return $s;
176 176
             }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
             // Iterate all parts and replace absolute part with relative part
190 190
             for ($i = 1; $i <= count($parts); $i++) {
191
-                $relative = str_replace(implode('/', $parts) . '/', str_repeat('../', $i), $relative, $count);
191
+                $relative = str_replace(implode('/', $parts).'/', str_repeat('../', $i), $relative, $count);
192 192
                 array_pop($parts);
193 193
 
194 194
                 // Stop iteration if found
@@ -197,45 +197,45 @@  discard block
 block discarded – undo
197 197
             }
198 198
 
199 199
             // Does a module exist? (/modules/xyz/controllers/)
200
-            if (is_dir($source = $location . $module . '/controllers/')) {
200
+            if (is_dir($source = $location.$module.'/controllers/')) {
201 201
                 $this->module = $module;
202
-                $this->directory = $relative . $module . '/controllers/';
202
+                $this->directory = $relative.$module.'/controllers/';
203 203
 
204 204
                 // Module root controller?
205
-                if ($directory && is_file($source . $_ucfirst($directory) . '.php')) {
205
+                if ($directory && is_file($source.$_ucfirst($directory).'.php')) {
206 206
                     $this->class = $directory;
207 207
                     return array_slice($segments, 1);
208 208
                 }
209 209
 
210 210
                 // Module sub-directory?
211
-                if ($directory && is_dir($source . $directory . '/')) {
212
-                    $source = $source . $directory . '/';
213
-                    $this->directory .= $directory . '/';
211
+                if ($directory && is_dir($source.$directory.'/')) {
212
+                    $source = $source.$directory.'/';
213
+                    $this->directory .= $directory.'/';
214 214
 
215 215
                     // Module sub-directory controller?
216
-                    if (is_file($source . $_ucfirst($directory) . '.php')) {
216
+                    if (is_file($source.$_ucfirst($directory).'.php')) {
217 217
                         return array_slice($segments, 1);
218 218
                     }
219 219
 
220 220
                     // Module sub-directory  default controller?
221
-                    if (is_file($source . $_ucfirst($this->default_controller) . '.php')) {
221
+                    if (is_file($source.$_ucfirst($this->default_controller).'.php')) {
222 222
                         $segments[1] = $this->default_controller;
223 223
                         return array_slice($segments, 1);
224 224
                     }
225 225
 
226 226
                     // Module sub-directory sub-controller?
227
-                    if ($controller && is_file($source . $_ucfirst($controller) . '.php')) {
227
+                    if ($controller && is_file($source.$_ucfirst($controller).'.php')) {
228 228
                         return array_slice($segments, 2);
229 229
                     }
230 230
                 }
231 231
 
232 232
                 // Module controller?
233
-                if (is_file($source . $_ucfirst($module) . '.php')) {
233
+                if (is_file($source.$_ucfirst($module).'.php')) {
234 234
                     return $segments;
235 235
                 }
236 236
 
237 237
                 // Module default controller?
238
-                if (is_file($source . $_ucfirst($this->default_controller) . '.php')) {
238
+                if (is_file($source.$_ucfirst($this->default_controller).'.php')) {
239 239
                     $segments[0] = $this->default_controller;
240 240
                     return $segments;
241 241
                 }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         }
244 244
 
245 245
         // Default controller?
246
-        if (is_file(APPPATH . 'controllers/' . $module . '/' . $_ucfirst($this->default_controller) . '.php')) {
246
+        if (is_file(APPPATH.'controllers/'.$module.'/'.$_ucfirst($this->default_controller).'.php')) {
247 247
             $segments[0] = $this->default_controller;
248 248
             return $segments;
249 249
         }
Please login to merge, or discard this patch.
application/views/emails/usermailer/didRegister.html.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
             <p>If that was you - then click the link below to activate your account:</p>
12 12
 
13 13
             <p>
14
-                <a href="<?= $link ."?e={$email}&code={$token}" ?>">
15
-                    <?= $link ."?e={$email}&code={$token}" ?>
14
+                <a href="<?= $link."?e={$email}&code={$token}" ?>">
15
+                    <?= $link."?e={$email}&code={$token}" ?>
16 16
                 </a>
17 17
             </p>
18 18
 
Please login to merge, or discard this patch.
application/views/emails/usermailer/didRegister.text.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
 
6 6
 If that was you - then click the link below to activate your account:
7 7
 
8
-<?= $link ."?e={$email}&code={$token}" ?>
8
+<?= $link."?e={$email}&code={$token}" ?>
9 9
 
10 10
 If the link does not work, please visit the following page: <?= $link ?> and enter the following token when asked:
11 11
 
Please login to merge, or discard this patch.
application/views/emails/usermailer/remindUser.html.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
             <p>If you do need to reset your password, please visit the following link:</p>
12 12
             
13 13
             <p>
14
-                <a href="<?= $link ."?e={$email}&code={$code}" ?>">
15
-                    <?= $link ."?e={$email}&code={$code}" ?>
14
+                <a href="<?= $link."?e={$email}&code={$code}" ?>">
15
+                    <?= $link."?e={$email}&code={$code}" ?>
16 16
                 </a>
17 17
             </p>
18 18
 
Please login to merge, or discard this patch.
application/views/emails/usermailer/reminduser.text.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
 
6 6
 If you do need to reset your password, please visit the following link:
7 7
 
8
-<?= $link ."?e={$email}&code={$code}" ?>
8
+<?= $link."?e={$email}&code={$code}" ?>
9 9
 
10 10
 If the link does not work, please visit the following page: <?= $link ?> and enter the following code when asked:
11 11
 
Please login to merge, or discard this patch.