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
Push — master ( 776629...deac27 )
by
unknown
03:03
created
src/Http/Presenter.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -58,27 +58,27 @@  discard block
 block discarded – undo
58 58
 
59 59
             // autoload presenter assets
60 60
             if ($config->offsetExists('assets')) {
61
-                $this->assets->autoload($config->assets[ 'autoload' ]);
61
+                $this->assets->autoload($config->assets['autoload']);
62 62
             }
63 63
 
64 64
             // autoload presenter theme
65 65
             if ($config->offsetExists('theme')) {
66
-                if(false !== ($theme = $config->offsetGet('theme'))) {
66
+                if (false !== ($theme = $config->offsetGet('theme'))) {
67 67
                     $this->theme->set($config->offsetGet('theme'));
68 68
                     $this->theme->load();
69 69
                 }
70 70
             }
71 71
 
72 72
             // autoload presenter manifest
73
-            if($config->offsetExists('manifest')) {
73
+            if ($config->offsetExists('manifest')) {
74 74
                 $manifest = $config->offsetGet('manifest');
75 75
 
76
-                foreach($manifest as $offset => $value) {
77
-                    if(empty($value)) {
76
+                foreach ($manifest as $offset => $value) {
77
+                    if (empty($value)) {
78 78
                         continue;
79 79
                     }
80 80
 
81
-                    if($offset === 'icons') {
81
+                    if ($offset === 'icons') {
82 82
                         $value = array_values($value);
83 83
                     }
84 84
 
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
         $storage = $this->storage;
96 96
 
97 97
         // Add Services
98
-        $storage[ 'config' ] = config();
99
-        $storage[ 'language' ] = language();
100
-        $storage[ 'session' ] = session();
101
-        $storage[ 'presenter' ] = presenter();
102
-        $storage[ 'input' ] = input();
98
+        $storage['config'] = config();
99
+        $storage['language'] = language();
100
+        $storage['session'] = session();
101
+        $storage['presenter'] = presenter();
102
+        $storage['input'] = input();
103 103
 
104 104
         // Add Container
105
-        $storage[ 'globals' ] = globals();
105
+        $storage['globals'] = globals();
106 106
 
107 107
         return $storage;
108 108
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             return models('controller');
121 121
         } elseif ($property === 'services' || $property === 'libraries') {
122 122
             return services();
123
-        } elseif( method_exists($this, $property) ) {
123
+        } elseif (method_exists($this, $property)) {
124 124
             return call_user_func([&$this, $property]);
125 125
         }
126 126
 
Please login to merge, or discard this patch.
src/Http/Presenter/Theme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
                 define('PATH_THEME', $pathTheme);
41 41
             }
42 42
 
43
-            if(services()->has('view')) {
43
+            if (services()->has('view')) {
44 44
                 // add theme view directory
45 45
                 view()->addFilePath($this->active->getRealPath());
46 46
             }
Please login to merge, or discard this patch.
src/Http/Presenter/Assets/Positions/Body.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 
57 57
         // Render js
58 58
         if ($this->javascript->count()) {
59
-            foreach($this->javascript as $js) {
60
-                if(in_array(pathinfo($js, PATHINFO_FILENAME), $unbundledFilename)) {
59
+            foreach ($this->javascript as $js) {
60
+                if (in_array(pathinfo($js, PATHINFO_FILENAME), $unbundledFilename)) {
61 61
                     $jsVersion = $this->getVersion($js);
62 62
                     $output[] = '<script type="text/javascript" src="' . $this->getUrl($js) . '?v=' . $jsVersion . '"></script>';
63 63
                 }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             if (is_file($bundleJsFilePath . '.map')) {
73 73
                 $bundleJsMap = json_decode(file_get_contents($bundleJsFilePath . '.map'), true);
74 74
                 // if the file version is changed delete it first
75
-                if ( ! hash_equals($bundleJsVersion, $bundleJsMap[ 'version' ])) {
75
+                if ( ! hash_equals($bundleJsVersion, $bundleJsMap['version'])) {
76 76
                     unlink($bundleJsFilePath);
77 77
                     unlink($bundleJsFilePath . '.map');
78 78
                 }
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
                     flock($bundleFileStream, LOCK_EX);
89 89
 
90 90
                     foreach ($this->css as $css) {
91
-                        if( ! in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
92
-                            $bundleJsMap[ 'sources' ][] = $css;
91
+                        if ( ! in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
92
+                            $bundleJsMap['sources'][] = $css;
93 93
                             fwrite($bundleFileStream, file_get_contents($css));
94 94
                         }
95 95
                     }
Please login to merge, or discard this patch.
src/Http/Presenter/Assets/Positions/Abstracts/AbstractPosition.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $property = is_null($subDir) ? 'css' : null;
109 109
 
110
-        if(is_null($property)) {
110
+        if (is_null($property)) {
111 111
             switch ($subDir) {
112 112
                 default:
113 113
                 case 'css/':
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
         foreach ($directories as $directory) {
154 154
             $extension = pathinfo($directory . $filePath, PATHINFO_EXTENSION);
155 155
 
156
-            if(empty($extension) and empty($subDir)) {
156
+            if (empty($extension) and empty($subDir)) {
157 157
                 $extensions = ['.css', '.js'];
158
-            } elseif(empty($extension) and isset($subDir)) {
158
+            } elseif (empty($extension) and isset($subDir)) {
159 159
                 switch ($subDir) {
160 160
                     default:
161 161
                     case 'css/':
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 }
199 199
             }
200 200
 
201
-            foreach($extensions as $extension) {
201
+            foreach ($extensions as $extension) {
202 202
                 // without subdirectory
203 203
                 if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
204 204
                     $filePaths[] = $directory . $filePath . '.min' . $extension; // minify version support
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
         foreach ($filePaths as $filePath) {
221 221
             if (is_file($filePath)) {
222
-                if(empty($property)) {
222
+                if (empty($property)) {
223 223
                     $extension = pathinfo($filePath, PATHINFO_EXTENSION);
224 224
                     switch ($extension) {
225 225
                         case 'font':
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             $strInt[] = str_pad(hexdec($strPart), 5, '0', STR_PAD_LEFT);
268 268
         }
269 269
 
270
-        $codeVersion = round( implode('', $strInt), 10 );
270
+        $codeVersion = round(implode('', $strInt), 10);
271 271
 
272 272
         return substr_replace($codeVersion, '.', 3, strlen($codeVersion) - 5);
273 273
     }
Please login to merge, or discard this patch.
src/Http/Presenter/Assets/Positions/Head.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             if (is_file($bundleFontFilePath . '.map')) {
82 82
                 $bundleFontMap = json_decode(file_get_contents($bundleFontFilePath . '.map'), true);
83 83
                 // if the file version is changed delete it first
84
-                if ( ! hash_equals($bundleFontVersion, $bundleFontMap[ 'version' ])) {
84
+                if ( ! hash_equals($bundleFontVersion, $bundleFontMap['version'])) {
85 85
                     unlink($bundleFontFilePath);
86 86
                     unlink($bundleFontFilePath . '.map');
87 87
                 }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                     flock($bundleFileStream, LOCK_EX);
98 98
 
99 99
                     foreach ($this->font as $font) {
100
-                        $bundleFontMap[ 'sources' ][] = $font;
100
+                        $bundleFontMap['sources'][] = $font;
101 101
                         fwrite($bundleFileStream, file_get_contents($font));
102 102
                     }
103 103
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 
132 132
         // Render css
133 133
         if ($this->css->count()) {
134
-            foreach($this->css as $css) {
135
-                if(in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
134
+            foreach ($this->css as $css) {
135
+                if (in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
136 136
                     $cssVersion = $this->getVersion($css);
137 137
                     $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $this->getUrl($css) . '?v=' . $cssVersion . '">';
138 138
                 }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             if (is_file($bundleCssFilePath . '.map')) {
148 148
                 $bundleCssMap = json_decode(file_get_contents($bundleCssFilePath . '.map'), true);
149 149
                 // if the file version is changed delete it first
150
-                if ( ! hash_equals($bundleCssVersion, $bundleCssMap[ 'version' ])) {
150
+                if ( ! hash_equals($bundleCssVersion, $bundleCssMap['version'])) {
151 151
                     unlink($bundleCssFilePath);
152 152
                     unlink($bundleCssFilePath . '.map');
153 153
                 }
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
                     flock($bundleFileStream, LOCK_EX);
164 164
 
165 165
                     foreach ($this->css as $css) {
166
-                        if( ! in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
167
-                            $bundleCssMap[ 'sources' ][] = $css;
166
+                        if ( ! in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
167
+                            $bundleCssMap['sources'][] = $css;
168 168
                             fwrite($bundleFileStream, file_get_contents($css));
169 169
                         }
170 170
                     }
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 
198 198
         // Render js
199 199
         if ($this->javascript->count()) {
200
-            foreach($this->javascript as $js) {
201
-                if(in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
200
+            foreach ($this->javascript as $js) {
201
+                if (in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
202 202
                     $jsVersion = $this->getVersion($js);
203 203
                     $output[] = '<script type="text/javascript" src="' . $this->getUrl($js) . '?v=' . $jsVersion . '"></script>';
204 204
                 }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             if (is_file($bundleJsFilePath . '.map')) {
214 214
                 $bundleJsMap = json_decode(file_get_contents($bundleJsFilePath . '.map'), true);
215 215
                 // if the file version is changed delete it first
216
-                if ( ! hash_equals($bundleJsVersion, $bundleJsMap[ 'version' ])) {
216
+                if ( ! hash_equals($bundleJsVersion, $bundleJsMap['version'])) {
217 217
                     unlink($bundleJsFilePath);
218 218
                     unlink($bundleJsFilePath . '.map');
219 219
                 }
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
                     flock($bundleFileStream, LOCK_EX);
230 230
 
231 231
                     foreach ($this->css as $css) {
232
-                        if( ! in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
233
-                            $bundleJsMap[ 'sources' ][] = $css;
232
+                        if ( ! in_array(pathinfo($css, PATHINFO_FILENAME), $unbundledFilename)) {
233
+                            $bundleJsMap['sources'][] = $css;
234 234
                             fwrite($bundleFileStream, file_get_contents($css));
235 235
                         }
236 236
                     }
Please login to merge, or discard this patch.
src/Http/Presenter/Assets.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         if (count($subPackages)) {
135 135
 
136 136
             if (array_key_exists('libraries', $subPackages)) {
137
-                foreach ($subPackages[ 'libraries' ] as $subPackageFile) {
137
+                foreach ($subPackages['libraries'] as $subPackageFile) {
138 138
                     $pluginDir = $packageDir . 'libraries' . DIRECTORY_SEPARATOR;
139 139
                     $pluginName = $subPackageFile;
140 140
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     }
146 146
                 }
147 147
 
148
-                unset($subPackages[ 'libraries' ]);
148
+                unset($subPackages['libraries']);
149 149
             }
150 150
 
151 151
             $this->head->loadFile($packageDir . $package . '.css');
@@ -400,19 +400,19 @@  discard block
 block discarded – undo
400 400
         }
401 401
 
402 402
         // Valet path fixes
403
-        if (isset($_SERVER[ 'SCRIPT_FILENAME' ])) {
404
-            $valetPath = dirname($_SERVER[ 'SCRIPT_FILENAME' ]) . DIRECTORY_SEPARATOR;
403
+        if (isset($_SERVER['SCRIPT_FILENAME'])) {
404
+            $valetPath = dirname($_SERVER['SCRIPT_FILENAME']) . DIRECTORY_SEPARATOR;
405 405
         } else {
406
-            $PATH_ROOT = $_SERVER[ 'DOCUMENT_ROOT' ];
407
-
408
-            if (isset($_SERVER[ 'PHP_SELF' ])) {
409
-                $valetPath = $PATH_ROOT . dirname($_SERVER[ 'PHP_SELF' ]) . DIRECTORY_SEPARATOR;
410
-            } elseif (isset($_SERVER[ 'DOCUMENT_URI' ])) {
411
-                $valetPath = $PATH_ROOT . dirname($_SERVER[ 'DOCUMENT_URI' ]) . DIRECTORY_SEPARATOR;
412
-            } elseif (isset($_SERVER[ 'REQUEST_URI' ])) {
413
-                $valetPath = $PATH_ROOT . dirname($_SERVER[ 'REQUEST_URI' ]) . DIRECTORY_SEPARATOR;
414
-            } elseif (isset($_SERVER[ 'SCRIPT_NAME' ])) {
415
-                $valetPath = $PATH_ROOT . dirname($_SERVER[ 'SCRIPT_NAME' ]) . DIRECTORY_SEPARATOR;
406
+            $PATH_ROOT = $_SERVER['DOCUMENT_ROOT'];
407
+
408
+            if (isset($_SERVER['PHP_SELF'])) {
409
+                $valetPath = $PATH_ROOT . dirname($_SERVER['PHP_SELF']) . DIRECTORY_SEPARATOR;
410
+            } elseif (isset($_SERVER['DOCUMENT_URI'])) {
411
+                $valetPath = $PATH_ROOT . dirname($_SERVER['DOCUMENT_URI']) . DIRECTORY_SEPARATOR;
412
+            } elseif (isset($_SERVER['REQUEST_URI'])) {
413
+                $valetPath = $PATH_ROOT . dirname($_SERVER['REQUEST_URI']) . DIRECTORY_SEPARATOR;
414
+            } elseif (isset($_SERVER['SCRIPT_NAME'])) {
415
+                $valetPath = $PATH_ROOT . dirname($_SERVER['SCRIPT_NAME']) . DIRECTORY_SEPARATOR;
416 416
             }
417 417
         }
418 418
 
Please login to merge, or discard this patch.