@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | // autoload presenter assets |
58 | 58 | if ($config->offsetExists('assets')) { |
59 | - $this->assets->autoload($config->assets[ 'autoload' ]); |
|
59 | + $this->assets->autoload($config->assets['autoload']); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | // autoload presenter theme |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | // autoload presenter manifest |
69 | - if($config->offsetExists('manifest')) { |
|
69 | + if ($config->offsetExists('manifest')) { |
|
70 | 70 | $manifest = $config->offsetGet('manifest'); |
71 | 71 | |
72 | - foreach($manifest as $offset => $value) { |
|
73 | - if(empty($value)) { |
|
72 | + foreach ($manifest as $offset => $value) { |
|
73 | + if (empty($value)) { |
|
74 | 74 | continue; |
75 | 75 | } |
76 | 76 | |
77 | - if($offset === 'icons') { |
|
77 | + if ($offset === 'icons') { |
|
78 | 78 | $value = array_values($value); |
79 | 79 | } |
80 | 80 | |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | $storage = $this->storage; |
92 | 92 | |
93 | 93 | // Add Services |
94 | - $storage[ 'config' ] = config(); |
|
95 | - $storage[ 'language' ] = language(); |
|
96 | - $storage[ 'session' ] = session(); |
|
97 | - $storage[ 'presenter' ] = presenter(); |
|
98 | - $storage[ 'input' ] = input(); |
|
94 | + $storage['config'] = config(); |
|
95 | + $storage['language'] = language(); |
|
96 | + $storage['session'] = session(); |
|
97 | + $storage['presenter'] = presenter(); |
|
98 | + $storage['input'] = input(); |
|
99 | 99 | |
100 | 100 | // Add Container |
101 | - $storage[ 'globals' ] = globals(); |
|
101 | + $storage['globals'] = globals(); |
|
102 | 102 | |
103 | 103 | return $storage; |
104 | 104 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return models('controller'); |
119 | 119 | } elseif ($property === 'services' || $property === 'libraries') { |
120 | 120 | return services(); |
121 | - } elseif( method_exists($this, $property) ) { |
|
121 | + } elseif (method_exists($this, $property)) { |
|
122 | 122 | return call_user_func([&$this, $property]); |
123 | 123 | } |
124 | 124 |
@@ -38,12 +38,12 @@ |
||
38 | 38 | $debugIpAddresses = config('ipAddresses')->offsetGet('debug'); |
39 | 39 | |
40 | 40 | if (in_array($clientIpAddress, $debugIpAddresses)) { |
41 | - $_ENV[ 'DEBUG_STAGE' ] = 'DEVELOPER'; |
|
41 | + $_ENV['DEBUG_STAGE'] = 'DEVELOPER'; |
|
42 | 42 | |
43 | 43 | error_reporting(-1); |
44 | 44 | ini_set('display_errors', 1); |
45 | 45 | |
46 | - if (isset($_REQUEST[ 'PHP_INFO' ])) { |
|
46 | + if (isset($_REQUEST['PHP_INFO'])) { |
|
47 | 47 | phpinfo(); |
48 | 48 | exit(EXIT_SUCCESS); |
49 | 49 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | if ($cacheHandle instanceof \O2System\Psr\Cache\CacheItemPoolInterface) { |
47 | - if($cacheHandle->hasItem($cacheKey)) { |
|
47 | + if ($cacheHandle->hasItem($cacheKey)) { |
|
48 | 48 | output() |
49 | 49 | ->setContentType('text/html') |
50 | 50 | ->send($cacheHandle->getItem($cacheKey)->get()); |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | { |
49 | 49 | $element = new Element('meta'); |
50 | 50 | |
51 | - $element->attributes[ 'name' ] = 'fb:app_id'; |
|
52 | - $element->attributes[ 'content' ] = $appID; |
|
51 | + $element->attributes['name'] = 'fb:app_id'; |
|
52 | + $element->attributes['content'] = $appID; |
|
53 | 53 | |
54 | 54 | parent::offsetSet('fb:app_id', $element); |
55 | 55 | |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | $property = 'og:' . $property; |
71 | 71 | $element = new Element('meta'); |
72 | 72 | |
73 | - $element->attributes[ 'name' ] = $property; |
|
74 | - $element->attributes[ 'content' ] = (is_array($content) ? implode(', ', $content) : trim($content)); |
|
73 | + $element->attributes['name'] = $property; |
|
74 | + $element->attributes['content'] = (is_array($content) ? implode(', ', $content) : trim($content)); |
|
75 | 75 | |
76 | 76 | parent::offsetSet($property, $element); |
77 | 77 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function setName($name) |
30 | 30 | { |
31 | 31 | $xName = explode(' ', $name); |
32 | - $firstName = $xName[ 0 ]; |
|
32 | + $firstName = $xName[0]; |
|
33 | 33 | |
34 | 34 | array_shift($xName); |
35 | 35 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | if (isset($profile)) { |
32 | 32 | foreach ($profile->getArrayCopy() as $property => $element) { |
33 | 33 | $property = $this->namespace . ':' . $profile->namespace . ':' . $property; |
34 | - $element->attributes[ 'name' ] = $property; |
|
34 | + $element->attributes['name'] = $property; |
|
35 | 35 | $this->offsetSet($property, $element); |
36 | 36 | } |
37 | 37 | } |
@@ -33,8 +33,8 @@ |
||
33 | 33 | |
34 | 34 | $element = new Element('meta'); |
35 | 35 | |
36 | - $element->attributes[ 'name' ] = $property; |
|
37 | - $element->attributes[ 'content' ] = (is_array($content) ? implode(', ', $content) : trim($content)); |
|
36 | + $element->attributes['name'] = $property; |
|
37 | + $element->attributes['content'] = (is_array($content) ? implode(', ', $content) : trim($content)); |
|
38 | 38 | |
39 | 39 | $this->store($property, $element); |
40 | 40 |
@@ -37,8 +37,8 @@ |
||
37 | 37 | $config = presenter()->getConfig('assets'); |
38 | 38 | |
39 | 39 | $webpack = false; |
40 | - if (isset($config[ 'webpack' ])) { |
|
41 | - $webpack = (bool)$config[ 'webpack' ]; |
|
40 | + if (isset($config['webpack'])) { |
|
41 | + $webpack = (bool)$config['webpack']; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $output = []; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | if (count($subPackages)) { |
86 | 86 | |
87 | 87 | if (array_key_exists('libraries', $subPackages)) { |
88 | - foreach ($subPackages[ 'libraries' ] as $subPackageFile) { |
|
88 | + foreach ($subPackages['libraries'] as $subPackageFile) { |
|
89 | 89 | $pluginDir = $packageDir . 'libraries' . DIRECTORY_SEPARATOR; |
90 | 90 | $pluginName = $subPackageFile; |
91 | 91 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
99 | - unset($subPackages[ 'libraries' ]); |
|
99 | + unset($subPackages['libraries']); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | $this->head->loadFile($packageDir . $package . '.css'); |
@@ -189,12 +189,12 @@ discard block |
||
189 | 189 | if (is_array($item)) { |
190 | 190 | foreach ($item as $filename) { |
191 | 191 | if (array_key_exists($filename, $this->{$type . 'Assets'})) { |
192 | - unset($this->{$type . 'Assets'}[ $filename ]); |
|
192 | + unset($this->{$type . 'Assets'}[$filename]); |
|
193 | 193 | } |
194 | 194 | } |
195 | 195 | } elseif (is_string($item)) { |
196 | 196 | if (array_key_exists($item, $this->{$type . 'Assets'})) { |
197 | - unset($this->{$type . 'Assets'}[ $item ]); |
|
197 | + unset($this->{$type . 'Assets'}[$item]); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | } |
@@ -284,19 +284,19 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | // Valet path fixes |
287 | - if (isset($_SERVER[ 'SCRIPT_FILENAME' ])) { |
|
288 | - $valetPath = dirname($_SERVER[ 'SCRIPT_FILENAME' ]) . DIRECTORY_SEPARATOR; |
|
287 | + if (isset($_SERVER['SCRIPT_FILENAME'])) { |
|
288 | + $valetPath = dirname($_SERVER['SCRIPT_FILENAME']) . DIRECTORY_SEPARATOR; |
|
289 | 289 | } else { |
290 | - $PATH_ROOT = $_SERVER[ 'DOCUMENT_ROOT' ]; |
|
291 | - |
|
292 | - if (isset($_SERVER[ 'PHP_SELF' ])) { |
|
293 | - $valetPath = $PATH_ROOT . dirname($_SERVER[ 'PHP_SELF' ]) . DIRECTORY_SEPARATOR; |
|
294 | - } elseif (isset($_SERVER[ 'DOCUMENT_URI' ])) { |
|
295 | - $valetPath = $PATH_ROOT . dirname($_SERVER[ 'DOCUMENT_URI' ]) . DIRECTORY_SEPARATOR; |
|
296 | - } elseif (isset($_SERVER[ 'REQUEST_URI' ])) { |
|
297 | - $valetPath = $PATH_ROOT . dirname($_SERVER[ 'REQUEST_URI' ]) . DIRECTORY_SEPARATOR; |
|
298 | - } elseif (isset($_SERVER[ 'SCRIPT_NAME' ])) { |
|
299 | - $valetPath = $PATH_ROOT . dirname($_SERVER[ 'SCRIPT_NAME' ]) . DIRECTORY_SEPARATOR; |
|
290 | + $PATH_ROOT = $_SERVER['DOCUMENT_ROOT']; |
|
291 | + |
|
292 | + if (isset($_SERVER['PHP_SELF'])) { |
|
293 | + $valetPath = $PATH_ROOT . dirname($_SERVER['PHP_SELF']) . DIRECTORY_SEPARATOR; |
|
294 | + } elseif (isset($_SERVER['DOCUMENT_URI'])) { |
|
295 | + $valetPath = $PATH_ROOT . dirname($_SERVER['DOCUMENT_URI']) . DIRECTORY_SEPARATOR; |
|
296 | + } elseif (isset($_SERVER['REQUEST_URI'])) { |
|
297 | + $valetPath = $PATH_ROOT . dirname($_SERVER['REQUEST_URI']) . DIRECTORY_SEPARATOR; |
|
298 | + } elseif (isset($_SERVER['SCRIPT_NAME'])) { |
|
299 | + $valetPath = $PATH_ROOT . dirname($_SERVER['SCRIPT_NAME']) . DIRECTORY_SEPARATOR; |
|
300 | 300 | } |
301 | 301 | } |
302 | 302 |