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.
Passed
Branch master (9c3470)
by O2System
04:07
created
src/Cli/Commanders/Make/Library.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,11 +85,11 @@
 block discarded – undo
85 85
                     $subNamespace
86 86
                 )) . '\\';
87 87
 
88
-        $vars[ 'CREATE_DATETIME' ] = date('d/m/Y H:m');
89
-        $vars[ 'NAMESPACE' ] = trim($classNamespace, '\\');
90
-        $vars[ 'PACKAGE' ] = '\\' . trim($classNamespace, '\\');
91
-        $vars[ 'CLASS' ] = $className;
92
-        $vars[ 'FILEPATH' ] = $filePath;
88
+        $vars['CREATE_DATETIME'] = date('d/m/Y H:m');
89
+        $vars['NAMESPACE'] = trim($classNamespace, '\\');
90
+        $vars['PACKAGE'] = '\\' . trim($classNamespace, '\\');
91
+        $vars['CLASS'] = $className;
92
+        $vars['FILEPATH'] = $filePath;
93 93
 
94 94
         $phpTemplate = <<<PHPTEMPLATE
95 95
 <?php
Please login to merge, or discard this patch.
src/Cli/Commanders/Make/Helper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,13 +72,13 @@
 block discarded – undo
72 72
             exit(EXIT_ERROR);
73 73
         }
74 74
 
75
-        $vars[ 'CREATE_DATETIME' ] = date('d/m/Y H:m');
76
-        $vars[ 'HELPER' ] = underscore(
75
+        $vars['CREATE_DATETIME'] = date('d/m/Y H:m');
76
+        $vars['HELPER'] = underscore(
77 77
             snakecase(
78 78
                 pathinfo($filePath, PATHINFO_FILENAME)
79 79
             )
80 80
         );
81
-        $vars[ 'FILEPATH' ] = $filePath;
81
+        $vars['FILEPATH'] = $filePath;
82 82
 
83 83
         $phpTemplate = <<<PHPTEMPLATE
84 84
 <?php
Please login to merge, or discard this patch.
src/Cli/Commanders/Make/Theme.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function optionName($name)
40 40
     {
41
-        if(empty($this->optionPath)) {
41
+        if (empty($this->optionPath)) {
42 42
             $this->optionPath = PATH_PUBLIC . 'themes' . DIRECTORY_SEPARATOR;
43 43
         }
44 44
 
@@ -78,18 +78,18 @@  discard block
 block discarded – undo
78 78
         // Make default structure
79 79
         mkdir($themePath . 'assets' . DIRECTORY_SEPARATOR, 0777, true);
80 80
 
81
-        foreach(['css','js', 'img', 'fonts', 'media', 'packages'] as $assetsDir) {
81
+        foreach (['css', 'js', 'img', 'fonts', 'media', 'packages'] as $assetsDir) {
82 82
             mkdir($themePath . 'assets' . DIRECTORY_SEPARATOR . $assetsDir . DIRECTORY_SEPARATOR, 0777, true);
83 83
         }
84 84
 
85 85
         mkdir($themePath . 'partials' . DIRECTORY_SEPARATOR, 0777, true);
86 86
 
87
-        $jsProps[ 'name' ] = readable(
87
+        $jsProps['name'] = readable(
88 88
             $this->optionName,
89 89
             true
90 90
         );
91 91
 
92
-        $jsProps[ 'created' ] = date('d M Y');
92
+        $jsProps['created'] = date('d M Y');
93 93
 
94 94
         file_put_contents($themePath . 'theme.jsprop', json_encode($jsProps, JSON_PRETTY_PRINT));
95 95
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 </html>
111 111
 THEME;
112 112
 
113
-        file_put_contents($themePath . 'theme.phtml', str_replace('@','$',$themeTemplate));
113
+        file_put_contents($themePath . 'theme.phtml', str_replace('@', '$', $themeTemplate));
114 114
 
115 115
         if (is_dir($themePath)) {
116 116
             output()->write(
Please login to merge, or discard this patch.
src/Cli/Commanders/Make/Widget.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             exit(EXIT_ERROR);
69 69
         }
70 70
 
71
-        $jsProps[ 'name' ] = readable(
71
+        $jsProps['name'] = readable(
72 72
             pathinfo($widgetPath, PATHINFO_FILENAME),
73 73
             true
74 74
         );
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
                 ) . '\\';
82 82
         } else {
83 83
             $namespace = prepare_class_name($this->namespace);
84
-            $jsProps[ 'namespace' ] = rtrim($namespace, '\\') . '\\';
84
+            $jsProps['namespace'] = rtrim($namespace, '\\') . '\\';
85 85
         }
86 86
 
87
-        $jsProps[ 'created' ] = date('d M Y');
87
+        $jsProps['created'] = date('d M Y');
88 88
 
89 89
         loader()->addNamespace($namespace, $widgetPath);
90 90
 
Please login to merge, or discard this patch.
src/Cli/Commanders/Make/Config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,9 +72,9 @@
 block discarded – undo
72 72
             exit(EXIT_ERROR);
73 73
         }
74 74
 
75
-        $vars[ 'CREATE_DATETIME' ] = date('d/m/Y H:m');
76
-        $vars[ 'CONFIG' ] = '$' . camelcase(pathinfo($filePath, PATHINFO_FILENAME));
77
-        $vars[ 'FILEPATH' ] = $filePath;
75
+        $vars['CREATE_DATETIME'] = date('d/m/Y H:m');
76
+        $vars['CONFIG'] = '$' . camelcase(pathinfo($filePath, PATHINFO_FILENAME));
77
+        $vars['FILEPATH'] = $filePath;
78 78
 
79 79
         $phpTemplate = <<<PHPTEMPLATE
80 80
 <?php
Please login to merge, or discard this patch.
src/Cli/Commanders/Make/Model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,11 +85,11 @@
 block discarded – undo
85 85
                     $subNamespace
86 86
                 )) . '\\';
87 87
 
88
-        $vars[ 'CREATE_DATETIME' ] = date('d/m/Y H:m');
89
-        $vars[ 'NAMESPACE' ] = trim($classNamespace, '\\');
90
-        $vars[ 'PACKAGE' ] = '\\' . trim($classNamespace, '\\');
91
-        $vars[ 'CLASS' ] = $className;
92
-        $vars[ 'FILEPATH' ] = $filePath;
88
+        $vars['CREATE_DATETIME'] = date('d/m/Y H:m');
89
+        $vars['NAMESPACE'] = trim($classNamespace, '\\');
90
+        $vars['PACKAGE'] = '\\' . trim($classNamespace, '\\');
91
+        $vars['CLASS'] = $className;
92
+        $vars['FILEPATH'] = $filePath;
93 93
 
94 94
         $phpTemplate = <<<PHPTEMPLATE
95 95
 <?php
Please login to merge, or discard this patch.
src/Cli/Commanders/Maintenance.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -151,16 +151,16 @@  discard block
 block discarded – undo
151 151
         $options = input()->get();
152 152
 
153 153
         if (empty($options)) {
154
-            $_GET[ 'switch' ] = 'ON';
155
-            $_GET[ 'mode' ] = 'default';
156
-            $_GET[ 'lifetime' ] = 300;
157
-            $_GET[ 'title' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
158
-            $_GET[ 'message' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
154
+            $_GET['switch'] = 'ON';
155
+            $_GET['mode'] = 'default';
156
+            $_GET['lifetime'] = 300;
157
+            $_GET['title'] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
158
+            $_GET['message'] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
159 159
         } else {
160
-            $_GET[ 'mode' ] = 'default';
161
-            $_GET[ 'lifetime' ] = 300;
162
-            $_GET[ 'title' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
163
-            $_GET[ 'message' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
160
+            $_GET['mode'] = 'default';
161
+            $_GET['lifetime'] = 300;
162
+            $_GET['title'] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
163
+            $_GET['message'] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
164 164
         }
165 165
 
166 166
         parent::execute();
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
                     (new Format())
174 174
                         ->setContextualClass(Format::DANGER)
175 175
                         ->setString(language()->getLine('CLI_MAINTENANCE_ALREADY_STARTED', [
176
-                            $maintenanceInfo[ 'mode' ],
177
-                            $maintenanceInfo[ 'datetime' ],
178
-                            date('r', strtotime($maintenanceInfo[ 'datetime' ]) + $maintenanceInfo[ 'lifetime' ]),
179
-                            $maintenanceInfo[ 'title' ],
180
-                            $maintenanceInfo[ 'message' ],
176
+                            $maintenanceInfo['mode'],
177
+                            $maintenanceInfo['datetime'],
178
+                            date('r', strtotime($maintenanceInfo['datetime']) + $maintenanceInfo['lifetime']),
179
+                            $maintenanceInfo['title'],
180
+                            $maintenanceInfo['message'],
181 181
                         ]))
182 182
                         ->setNewLinesAfter(1)
183 183
                 );
Please login to merge, or discard this patch.
src/Cli/Commander.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 {
24 24
     public function &__get($property)
25 25
     {
26
-        $get[ $property ] = false;
26
+        $get[$property] = false;
27 27
 
28 28
         // CodeIgniter property aliasing
29 29
         if ($property === 'load') {
@@ -38,6 +38,6 @@  discard block
 block discarded – undo
38 38
             return models('controller');
39 39
         }
40 40
 
41
-        return $get[ $property ];
41
+        return $get[$property];
42 42
     }
43 43
 }
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
src/Containers/Modules.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -187,13 +187,13 @@  discard block
 block discarded – undo
187 187
 
188 188
         if (isset($config) AND is_array($config)) {
189 189
             // Set default timezone
190
-            if (isset($config[ 'datetime' ][ 'timezone' ])) {
191
-                date_default_timezone_set($config[ 'datetime' ][ 'timezone' ]);
190
+            if (isset($config['datetime']['timezone'])) {
191
+                date_default_timezone_set($config['datetime']['timezone']);
192 192
             }
193 193
 
194 194
             // Setup Language Ideom and Locale
195
-            if (isset($config[ 'language' ])) {
196
-                language()->setDefault($config[ 'language' ]);
195
+            if (isset($config['language'])) {
196
+                language()->setDefault($config['language']);
197 197
             }
198 198
 
199 199
             config()->merge($config);
@@ -410,8 +410,8 @@  discard block
 block discarded – undo
410 410
                 $propertiesFile = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $propertiesFile);
411 411
                 $propertiesFileInfo = pathinfo($propertiesFile);
412 412
 
413
-                if ($propertiesFileInfo[ 'filename' ] === 'widget' or
414
-                    $propertiesFileInfo[ 'filename' ] === 'language' or
413
+                if ($propertiesFileInfo['filename'] === 'widget' or
414
+                    $propertiesFileInfo['filename'] === 'language' or
415 415
                     strpos($propertiesFile, '.svn') !== false // subversion properties file conflict.
416 416
                 ) {
417 417
                     continue;
@@ -436,12 +436,12 @@  discard block
 block discarded – undo
436 436
                             ->setIndent(2)
437 437
                             ->setNewLinesAfter(1)
438 438
                     );
439
-                } elseif( ! is_array($propertiesMetadata) ) {
439
+                } elseif ( ! is_array($propertiesMetadata)) {
440 440
                     continue;
441 441
                 }
442 442
 
443
-                if(strpos($propertiesFile, $modularType = ucfirst(plural($propertiesFileInfo[ 'filename' ])) . DIRECTORY_SEPARATOR) === false) {
444
-                    $modularType = ucfirst($propertiesFileInfo[ 'filename' ]) . DIRECTORY_SEPARATOR;
443
+                if (strpos($propertiesFile, $modularType = ucfirst(plural($propertiesFileInfo['filename'])) . DIRECTORY_SEPARATOR) === false) {
444
+                    $modularType = ucfirst($propertiesFileInfo['filename']) . DIRECTORY_SEPARATOR;
445 445
                 }
446 446
 
447 447
                 $modularType = strtolower(rtrim($modularType, DIRECTORY_SEPARATOR));
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
                                 PATH_FRAMEWORK,
456 456
                                 PATH_PUBLIC,
457 457
                                 PATH_APP,
458
-                                $propertiesFileInfo[ 'basename' ],
458
+                                $propertiesFileInfo['basename'],
459 459
                                 ucfirst($modularType) . DIRECTORY_SEPARATOR,
460 460
                             ],
461 461
                             '',
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                     )
466 466
                 );
467 467
 
468
-                $moduleSegments = array_map(function ($string) {
468
+                $moduleSegments = array_map(function($string) {
469 469
                     return dash(snakecase($string));
470 470
                 }, $moduleSegments);
471 471
 
@@ -473,14 +473,14 @@  discard block
 block discarded – undo
473 473
                     str_replace(
474 474
                         PATH_ROOT,
475 475
                         '',
476
-                        $propertiesFileInfo[ 'dirname' ]
476
+                        $propertiesFileInfo['dirname']
477 477
                     ),
478 478
                     false
479 479
                 );
480 480
 
481
-                if (isset($propertiesMetadata[ 'namespace' ])) {
482
-                    $moduleNamespace = $propertiesMetadata[ 'namespace' ];
483
-                    unset($propertiesMetadata[ 'namespace' ]);
481
+                if (isset($propertiesMetadata['namespace'])) {
482
+                    $moduleNamespace = $propertiesMetadata['namespace'];
483
+                    unset($propertiesMetadata['namespace']);
484 484
                 }
485 485
 
486 486
                 $moduleParentSegments = [];
@@ -494,18 +494,18 @@  discard block
 block discarded – undo
494 494
                 $registryKey = implode('/', $moduleSegments);
495 495
 
496 496
                 if ($registryKey === '') {
497
-                    if ($propertiesFileInfo[ 'dirname' ] . DIRECTORY_SEPARATOR !== PATH_APP and $modularType === 'app') {
497
+                    if ($propertiesFileInfo['dirname'] . DIRECTORY_SEPARATOR !== PATH_APP and $modularType === 'app') {
498 498
                         $registryKey = dash(snakecase(
499
-                                pathinfo($propertiesFileInfo[ 'dirname' ], PATHINFO_FILENAME)));
499
+                                pathinfo($propertiesFileInfo['dirname'], PATHINFO_FILENAME)));
500 500
                     }
501 501
                 } else {
502 502
                     $registryKey = $registryKey;
503 503
                 }
504 504
 
505
-                $datastructures[ $registryKey ] = (new Datastructures\Module(
506
-                    $propertiesFileInfo[ 'dirname' ]
505
+                $datastructures[$registryKey] = (new Datastructures\Module(
506
+                    $propertiesFileInfo['dirname']
507 507
                 ))
508
-                    ->setType($propertiesFileInfo[ 'filename' ])
508
+                    ->setType($propertiesFileInfo['filename'])
509 509
                     ->setNamespace($moduleNamespace)
510 510
                     ->setSegments($moduleSegments)
511 511
                     ->setParentSegments($moduleParentSegments)
@@ -666,8 +666,8 @@  discard block
 block discarded – undo
666 666
         $segment = dash($segment);
667 667
 
668 668
         if ($this->exists($segment)) {
669
-            if ($this->registry[ $segment ] instanceof Datastructures\Module) {
670
-                return $this->registry[ $segment ];
669
+            if ($this->registry[$segment] instanceof Datastructures\Module) {
670
+                return $this->registry[$segment];
671 671
             }
672 672
         }
673 673
 
@@ -692,8 +692,8 @@  discard block
 block discarded – undo
692 692
 
693 693
     public function first()
694 694
     {
695
-        if (isset($this->registry[ '' ])) {
696
-            return $this->registry[ '' ];
695
+        if (isset($this->registry[''])) {
696
+            return $this->registry[''];
697 697
         } elseif (reset($this->registry)->type === 'APP') {
698 698
             return reset($this->registry);
699 699
         }
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
         $segments = (is_array($segments) ? implode('/', array_map('dash', $segments)) : $segments);
716 716
 
717 717
         if ($this->exists($segments)) {
718
-            return $this->registry[ $segments ];
718
+            return $this->registry[$segments];
719 719
         }
720 720
 
721 721
         return false;
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
 
737 737
         foreach ($this as $key => $module) {
738 738
             if ($module instanceof Datastructures\Module) {
739
-                $namespaces[ $key ] = new SplNamespaceInfo($module->getNamespace(), $module->getRealPath());
739
+                $namespaces[$key] = new SplNamespaceInfo($module->getNamespace(), $module->getRealPath());
740 740
             }
741 741
         }
742 742
 
Please login to merge, or discard this patch.