@@ -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 | } |
@@ -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 | |
@@ -51,28 +51,28 @@ |
||
| 51 | 51 | $element = new Element('meta'); |
| 52 | 52 | |
| 53 | 53 | if ($offset === 'http-equiv') { |
| 54 | - $element->attributes[ 'http-equiv' ] = $value[ 'property' ]; |
|
| 55 | - $element->attributes[ 'content' ] = $value[ 'content' ]; |
|
| 56 | - parent::store(camelcase('http_equiv_' . $value[ 'property' ]), $element); |
|
| 54 | + $element->attributes['http-equiv'] = $value['property']; |
|
| 55 | + $element->attributes['content'] = $value['content']; |
|
| 56 | + parent::store(camelcase('http_equiv_' . $value['property']), $element); |
|
| 57 | 57 | } else { |
| 58 | - $element->attributes[ 'name' ] = $offset; |
|
| 58 | + $element->attributes['name'] = $offset; |
|
| 59 | 59 | |
| 60 | 60 | if (is_array($value)) { |
| 61 | 61 | if (is_numeric(key($value))) { |
| 62 | - $element->attributes[ 'content' ] = implode(', ', $value); |
|
| 62 | + $element->attributes['content'] = implode(', ', $value); |
|
| 63 | 63 | } else { |
| 64 | 64 | $newValue = []; |
| 65 | 65 | foreach ($value as $key => $val) { |
| 66 | 66 | $newValue[] = $key . '=' . $val; |
| 67 | 67 | } |
| 68 | - $element->attributes[ 'content' ] = implode(', ', $newValue); |
|
| 68 | + $element->attributes['content'] = implode(', ', $newValue); |
|
| 69 | 69 | } |
| 70 | 70 | } else { |
| 71 | - $element->attributes[ 'content' ] = $value; |
|
| 71 | + $element->attributes['content'] = $value; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if (in_array($offset, ['description']) and $this->opengraph instanceof Meta\Opengraph) { |
| 75 | - $this->opengraph->setObject($element->attributes[ 'name' ], $element->attributes[ 'content' ]); |
|
| 75 | + $this->opengraph->setObject($element->attributes['name'], $element->attributes['content']); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | parent::store(camelcase($offset), $element); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | if (false !== ($key = array_search('download', $segments))) { |
| 48 | 48 | $download = true; |
| 49 | - unset($segments[ $key ]); |
|
| 49 | + unset($segments[$key]); |
|
| 50 | 50 | $segments = array_values($segments); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -226,9 +226,9 @@ discard block |
||
| 226 | 226 | if (is_numeric(key($code))) { |
| 227 | 227 | $message = reset($code); |
| 228 | 228 | $code = key($code); |
| 229 | - } elseif (isset($code[ 'code' ])) { |
|
| 230 | - $code = $code[ 'code' ]; |
|
| 231 | - $message = $code[ 'message' ]; |
|
| 229 | + } elseif (isset($code['code'])) { |
|
| 230 | + $code = $code['code']; |
|
| 231 | + $message = $code['message']; |
|
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | $longPoolingCacheMetadata = $longPoolingCacheData->getMetadata(); |
| 295 | 295 | |
| 296 | 296 | // if no timestamp delivered via ajax or data.txt has been changed SINCE last ajax timestamp |
| 297 | - if ($lastCallTimestamp == null || $longPoolingCacheMetadata[ 'ctime' ] > $lastCallTimestamp) { |
|
| 297 | + if ($lastCallTimestamp == null || $longPoolingCacheMetadata['ctime'] > $lastCallTimestamp) { |
|
| 298 | 298 | output()->send([ |
| 299 | 299 | 'timestamp' => $longPoolingCacheMetadata, |
| 300 | 300 | 'data' => $data, |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * @param $className |
| 19 | 19 | */ |
| 20 | 20 | spl_autoload_register( |
| 21 | - function ($className) { |
|
| 21 | + function($className) { |
|
| 22 | 22 | if ($className === 'O2System\Framework') { |
| 23 | 23 | require __DIR__ . DIRECTORY_SEPARATOR . 'Framework.php'; |
| 24 | 24 | } elseif (strpos($className, 'O2System\Framework\\') === false) { |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | $options = input()->get(); |
| 95 | 95 | |
| 96 | 96 | if (empty($options)) { |
| 97 | - $_GET[ 'host' ] = 'localhost'; |
|
| 98 | - $_GET[ 'port' ] = 8000; |
|
| 97 | + $_GET['host'] = 'localhost'; |
|
| 98 | + $_GET['port'] = 8000; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | parent::execute(); |
@@ -107,12 +107,12 @@ discard block |
||
| 107 | 107 | ->setNewLinesAfter(1) |
| 108 | 108 | ); |
| 109 | 109 | |
| 110 | - $_SERVER[ 'DOCUMENT_ROOT' ] = PATH_PUBLIC; |
|
| 110 | + $_SERVER['DOCUMENT_ROOT'] = PATH_PUBLIC; |
|
| 111 | 111 | |
| 112 | 112 | output()->write( |
| 113 | 113 | (new Format()) |
| 114 | 114 | ->setContextualClass(Format::INFO) |
| 115 | - ->setString(language()->getLine('CLI_SERVE_DOC_ROOT', [$_SERVER[ 'DOCUMENT_ROOT' ]])) |
|
| 115 | + ->setString(language()->getLine('CLI_SERVE_DOC_ROOT', [$_SERVER['DOCUMENT_ROOT']])) |
|
| 116 | 116 | ->setNewLinesAfter(1) |
| 117 | 117 | ); |
| 118 | 118 | |