@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function index() |
30 | 30 | { |
31 | - if(false !== ($config = $this->config->loadFile('manifest', true))) { |
|
31 | + if (false !== ($config = $this->config->loadFile('manifest', true))) { |
|
32 | 32 | print_out('test'); |
33 | 33 | } |
34 | 34 |
@@ -282,21 +282,21 @@ |
||
282 | 282 | ]; |
283 | 283 | |
284 | 284 | $this->statusCode = $code; |
285 | - $this->reasonPhrase = $error[ 'title' ]; |
|
285 | + $this->reasonPhrase = $error['title']; |
|
286 | 286 | |
287 | 287 | if (is_string($vars)) { |
288 | 288 | $vars = ['message' => $vars]; |
289 | - } elseif (is_array($vars) and empty($vars[ 'message' ])) { |
|
290 | - $vars[ 'message' ] = $error[ 'message' ]; |
|
289 | + } elseif (is_array($vars) and empty($vars['message'])) { |
|
290 | + $vars['message'] = $error['message']; |
|
291 | 291 | } |
292 | 292 | |
293 | - if (isset($vars[ 'message' ])) { |
|
294 | - $error[ 'message' ] = $vars[ 'message' ]; |
|
293 | + if (isset($vars['message'])) { |
|
294 | + $error['message'] = $vars['message']; |
|
295 | 295 | } |
296 | 296 | |
297 | 297 | if (is_ajax() or $this->mimeType !== 'text/html') { |
298 | 298 | $this->statusCode = $code; |
299 | - $this->reasonPhrase = $error[ 'title' ]; |
|
299 | + $this->reasonPhrase = $error['title']; |
|
300 | 300 | $this->send($vars); |
301 | 301 | |
302 | 302 | exit(EXIT_ERROR); |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function __construct() |
154 | 154 | { |
155 | - if (isset($_SERVER[ 'HTTP_USER_AGENT' ])) { |
|
156 | - $this->string = trim($_SERVER[ 'HTTP_USER_AGENT' ]); |
|
155 | + if (isset($_SERVER['HTTP_USER_AGENT'])) { |
|
156 | + $this->string = trim($_SERVER['HTTP_USER_AGENT']); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | if ($this->string !== null && $this->loadAgentFile()) { |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } |
277 | 277 | |
278 | 278 | // Check for a specific browser |
279 | - return (isset(static::$browsers[ $key ]) && $this->browser === static::$browsers[ $key ]); |
|
279 | + return (isset(static::$browsers[$key]) && $this->browser === static::$browsers[$key]); |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | // -------------------------------------------------------------------- |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | } |
301 | 301 | |
302 | 302 | // Check for a specific robot |
303 | - return (isset(static::$robots[ $key ]) && $this->robot === static::$robots[ $key ]); |
|
303 | + return (isset(static::$robots[$key]) && $this->robot === static::$robots[$key]); |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | // -------------------------------------------------------------------- |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | } |
327 | 327 | |
328 | 328 | // Check for a specific robot |
329 | - return (isset(static::$mobiles[ $key ]) && $this->mobile === static::$mobiles[ $key ]); |
|
329 | + return (isset(static::$mobiles[$key]) && $this->mobile === static::$mobiles[$key]); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | // -------------------------------------------------------------------- |
@@ -341,10 +341,10 @@ discard block |
||
341 | 341 | public function isReferral() |
342 | 342 | { |
343 | 343 | if ( ! isset($this->referer)) { |
344 | - if (empty($_SERVER[ 'HTTP_REFERER' ])) { |
|
344 | + if (empty($_SERVER['HTTP_REFERER'])) { |
|
345 | 345 | $this->referer = false; |
346 | 346 | } else { |
347 | - $referer_host = @parse_url($_SERVER[ 'HTTP_REFERER' ], PHP_URL_HOST); |
|
347 | + $referer_host = @parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST); |
|
348 | 348 | $own_host = parse_url(base_url(), PHP_URL_HOST); |
349 | 349 | |
350 | 350 | $this->referer = ($referer_host && $referer_host !== $own_host); |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | */ |
450 | 450 | public function isHttpReferrerExists() |
451 | 451 | { |
452 | - return empty($_SERVER[ 'HTTP_REFERER' ]) ? '' : trim($_SERVER[ 'HTTP_REFERER' ]); |
|
452 | + return empty($_SERVER['HTTP_REFERER']) ? '' : trim($_SERVER['HTTP_REFERER']); |
|
453 | 453 | } |
454 | 454 | |
455 | 455 | // -------------------------------------------------------------------- |
@@ -497,13 +497,13 @@ discard block |
||
497 | 497 | */ |
498 | 498 | protected function setLanguages() |
499 | 499 | { |
500 | - if ((count($this->languages) === 0) && ! empty($_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ])) { |
|
500 | + if ((count($this->languages) === 0) && ! empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
501 | 501 | $this->languages = explode( |
502 | 502 | ',', |
503 | 503 | preg_replace( |
504 | 504 | '/(;\s?q=[0-9\.]+)|\s/i', |
505 | 505 | '', |
506 | - strtolower(trim($_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ])) |
|
506 | + strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])) |
|
507 | 507 | ) |
508 | 508 | ); |
509 | 509 | } |
@@ -557,13 +557,13 @@ discard block |
||
557 | 557 | */ |
558 | 558 | protected function setCharsets() |
559 | 559 | { |
560 | - if ((count($this->charsets) === 0) && ! empty($_SERVER[ 'HTTP_ACCEPT_CHARSET' ])) { |
|
560 | + if ((count($this->charsets) === 0) && ! empty($_SERVER['HTTP_ACCEPT_CHARSET'])) { |
|
561 | 561 | $this->charsets = explode( |
562 | 562 | ',', |
563 | 563 | preg_replace( |
564 | 564 | '/(;\s?q=.+)|\s/i', |
565 | 565 | '', |
566 | - strtolower(trim($_SERVER[ 'HTTP_ACCEPT_CHARSET' ])) |
|
566 | + strtolower(trim($_SERVER['HTTP_ACCEPT_CHARSET'])) |
|
567 | 567 | ) |
568 | 568 | ); |
569 | 569 | } |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | foreach (static::$browsers as $key => $val) { |
619 | 619 | if (preg_match('|' . $key . '.*?([0-9\.]+)|i', $this->string, $match)) { |
620 | 620 | $this->isBrowser = true; |
621 | - $this->browserVersion = $match[ 1 ]; |
|
621 | + $this->browserVersion = $match[1]; |
|
622 | 622 | $this->browser = $val; |
623 | 623 | $this->setMobile(); |
624 | 624 |
@@ -418,12 +418,12 @@ |
||
418 | 418 | $session->set('language', language()->getDefault()); |
419 | 419 | } |
420 | 420 | |
421 | - if (config('security')->protection[ 'csrf' ] === true) { |
|
421 | + if (config('security')->protection['csrf'] === true) { |
|
422 | 422 | $csrfProtection = new Security\Protections\Csrf(); |
423 | 423 | $this->services->add($csrfProtection, 'csrfProtection'); |
424 | 424 | } |
425 | 425 | |
426 | - if (config('security')->protection[ 'xss' ] === true) { |
|
426 | + if (config('security')->protection['xss'] === true) { |
|
427 | 427 | $xssProtection = new Security\Protections\Xss(); |
428 | 428 | $this->services->add($xssProtection, 'xssProtection'); |
429 | 429 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function &__get($property) |
32 | 32 | { |
33 | - $get[ $property ] = false; |
|
33 | + $get[$property] = false; |
|
34 | 34 | |
35 | 35 | // CodeIgniter property aliasing |
36 | 36 | if ($property === 'load') { |
@@ -45,6 +45,6 @@ discard block |
||
45 | 45 | return models('controller'); |
46 | 46 | } |
47 | 47 | |
48 | - return $get[ $property ]; |
|
48 | + return $get[$property]; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | \ No newline at end of file |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | exit(EXIT_ERROR); |
74 | 74 | } |
75 | 75 | |
76 | - $jsonProperties[ 'name' ] = readable( |
|
76 | + $jsonProperties['name'] = readable( |
|
77 | 77 | pathinfo($widgetPath, PATHINFO_FILENAME), |
78 | 78 | true |
79 | 79 | ); |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | ) . '\\'; |
87 | 87 | } else { |
88 | 88 | $namespace = prepare_class_name($this->namespace); |
89 | - $jsonProperties[ 'namespace' ] = rtrim($namespace, '\\') . '\\'; |
|
89 | + $jsonProperties['namespace'] = rtrim($namespace, '\\') . '\\'; |
|
90 | 90 | } |
91 | 91 | |
92 | - $jsonProperties[ 'created' ] = date('d M Y'); |
|
92 | + $jsonProperties['created'] = date('d M Y'); |
|
93 | 93 | |
94 | 94 | loader()->addNamespace($namespace, $widgetPath); |
95 | 95 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | exit(EXIT_ERROR); |
101 | 101 | } |
102 | 102 | |
103 | - $jsonProperties[ 'name' ] = readable( |
|
103 | + $jsonProperties['name'] = readable( |
|
104 | 104 | pathinfo($modulePath, PATHINFO_FILENAME), |
105 | 105 | true |
106 | 106 | ); |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | ) . '\\'; |
114 | 114 | } else { |
115 | 115 | $namespace = $this->namespace; |
116 | - $jsonProperties[ 'namespace' ] = rtrim($namespace, '\\') . '\\'; |
|
116 | + $jsonProperties['namespace'] = rtrim($namespace, '\\') . '\\'; |
|
117 | 117 | } |
118 | 118 | |
119 | - $jsonProperties[ 'created' ] = date('d M Y'); |
|
119 | + $jsonProperties['created'] = date('d M Y'); |
|
120 | 120 | |
121 | 121 | loader()->addNamespace($namespace, $modulePath); |
122 | 122 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | exit(EXIT_ERROR); |
101 | 101 | } |
102 | 102 | |
103 | - $jsonProperties[ 'name' ] = readable( |
|
103 | + $jsonProperties['name'] = readable( |
|
104 | 104 | pathinfo($modulePath, PATHINFO_FILENAME), |
105 | 105 | true |
106 | 106 | ); |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | ) . '\\'; |
114 | 114 | } else { |
115 | 115 | $namespace = $this->namespace; |
116 | - $jsonProperties[ 'namespace' ] = rtrim($namespace, '\\') . '\\'; |
|
116 | + $jsonProperties['namespace'] = rtrim($namespace, '\\') . '\\'; |
|
117 | 117 | } |
118 | 118 | |
119 | - $jsonProperties[ 'created' ] = date('d M Y'); |
|
119 | + $jsonProperties['created'] = date('d M Y'); |
|
120 | 120 | |
121 | 121 | loader()->addNamespace($namespace, $modulePath); |
122 | 122 |
@@ -101,12 +101,12 @@ |
||
101 | 101 | |
102 | 102 | mkdir($themePath . 'partials' . DIRECTORY_SEPARATOR, 0777, true); |
103 | 103 | |
104 | - $jsonProperties[ 'name' ] = readable( |
|
104 | + $jsonProperties['name'] = readable( |
|
105 | 105 | $this->optionName, |
106 | 106 | true |
107 | 107 | ); |
108 | 108 | |
109 | - $jsonProperties[ 'created' ] = date('d M Y'); |
|
109 | + $jsonProperties['created'] = date('d M Y'); |
|
110 | 110 | |
111 | 111 | file_put_contents($themePath . 'theme.json', json_encode($jsonProperties, JSON_PRETTY_PRINT)); |
112 | 112 |