| @@ -142,7 +142,7 @@ discard block | ||
| 142 | 142 | */ | 
| 143 | 143 | public function hasHeader($name) | 
| 144 | 144 |      { | 
| 145 | - return (bool)isset($this->headers[ $name ]); | |
| 145 | + return (bool)isset($this->headers[$name]); | |
| 146 | 146 | } | 
| 147 | 147 | |
| 148 | 148 | // ------------------------------------------------------------------------ | 
| @@ -171,8 +171,8 @@ discard block | ||
| 171 | 171 | */ | 
| 172 | 172 | public function getHeaderLine($name) | 
| 173 | 173 |      { | 
| 174 | -        if (isset($this->headers[ $name ])) { | |
| 175 | - $this->headers[ $name ]; | |
| 174 | +        if (isset($this->headers[$name])) { | |
| 175 | + $this->headers[$name]; | |
| 176 | 176 | } | 
| 177 | 177 | |
| 178 | 178 | return ''; | 
| @@ -233,8 +233,8 @@ discard block | ||
| 233 | 233 |      { | 
| 234 | 234 | $lines = []; | 
| 235 | 235 | |
| 236 | -        if (isset($this->headers[ $name ])) { | |
| 237 | -            $lines = array_map('trim', explode(',', $this->headers[ $name ])); | |
| 236 | +        if (isset($this->headers[$name])) { | |
| 237 | +            $lines = array_map('trim', explode(',', $this->headers[$name])); | |
| 238 | 238 | } | 
| 239 | 239 | |
| 240 | 240 | return $lines; | 
| @@ -263,7 +263,7 @@ discard block | ||
| 263 | 263 | public function withHeader($name, $value) | 
| 264 | 264 |      { | 
| 265 | 265 | $message = clone $this; | 
| 266 | - $message->headers[ $name ] = $value; | |
| 266 | + $message->headers[$name] = $value; | |
| 267 | 267 | |
| 268 | 268 | return $message; | 
| 269 | 269 | } | 
| @@ -289,8 +289,8 @@ discard block | ||
| 289 | 289 |      { | 
| 290 | 290 | $message = clone $this; | 
| 291 | 291 | |
| 292 | -        if (isset($message->headers[ $name ])) { | |
| 293 | - unset($message->headers[ $name ]); | |
| 292 | +        if (isset($message->headers[$name])) { | |
| 293 | + unset($message->headers[$name]); | |
| 294 | 294 | } | 
| 295 | 295 | |
| 296 | 296 | return $message; | 
| @@ -139,8 +139,8 @@ discard block | ||
| 139 | 139 |      { | 
| 140 | 140 | $stats = fstat($this->context); | 
| 141 | 141 | |
| 142 | -        if (isset($stats[ 'size' ])) { | |
| 143 | - return (int)$stats[ 'size' ]; | |
| 142 | +        if (isset($stats['size'])) { | |
| 143 | + return (int)$stats['size']; | |
| 144 | 144 | } | 
| 145 | 145 | |
| 146 | 146 | return null; | 
| @@ -217,8 +217,8 @@ discard block | ||
| 217 | 217 | |
| 218 | 218 |          if (empty($key)) { | 
| 219 | 219 | return $metadata; | 
| 220 | -        } elseif (isset($metadata[ $key ])) { | |
| 221 | - return $metadata[ $key ]; | |
| 220 | +        } elseif (isset($metadata[$key])) { | |
| 221 | + return $metadata[$key]; | |
| 222 | 222 | } | 
| 223 | 223 | |
| 224 | 224 | return null; | 
| @@ -262,8 +262,8 @@ discard block | ||
| 262 | 262 |              } elseif (null !== ($mode = $this->getMetadata('mode'))) { | 
| 263 | 263 |                  preg_match_all('/[a-z]\D?/', $mode, $matches); | 
| 264 | 264 | |
| 265 | -                if (isset($matches[ 0 ])) { | |
| 266 | -                    foreach ($matches[ 0 ] as $match) { | |
| 265 | +                if (isset($matches[0])) { | |
| 266 | +                    foreach ($matches[0] as $match) { | |
| 267 | 267 |                          if (in_array($match, ['r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+'])) { | 
| 268 | 268 | return true; | 
| 269 | 269 | |
| @@ -308,8 +308,8 @@ discard block | ||
| 308 | 308 |          if (null !== ($mode = $this->getMetadata('mode'))) { | 
| 309 | 309 |              preg_match_all('/[a-z]\D?/', $mode, $matches); | 
| 310 | 310 | |
| 311 | -            if (isset($matches[ 0 ])) { | |
| 312 | -                foreach ($matches[ 0 ] as $match) { | |
| 311 | +            if (isset($matches[0])) { | |
| 312 | +                foreach ($matches[0] as $match) { | |
| 313 | 313 |                      if (in_array($match, ['r', 'r+', 'w+', 'a+', 'x+', 'c+'])) { | 
| 314 | 314 | return true; | 
| 315 | 315 | break; | 
| @@ -53,11 +53,11 @@ | ||
| 53 | 53 |              throw new BadPhpExtensionCallException('E_HEADER_BADPHPEXTENSIONCALLEXCEPTION', 1); | 
| 54 | 54 | } | 
| 55 | 55 | |
| 56 | - $this->name = $uploadedFile[ 'name' ]; | |
| 57 | - $this->type = $uploadedFile[ 'type' ]; | |
| 58 | - $this->tmpName = $uploadedFile[ 'tmp_name' ]; | |
| 59 | - $this->size = $uploadedFile[ 'size' ]; | |
| 60 | - $this->error = $uploadedFile[ 'error' ]; | |
| 56 | + $this->name = $uploadedFile['name']; | |
| 57 | + $this->type = $uploadedFile['type']; | |
| 58 | + $this->tmpName = $uploadedFile['tmp_name']; | |
| 59 | + $this->size = $uploadedFile['size']; | |
| 60 | + $this->error = $uploadedFile['error']; | |
| 61 | 61 | } | 
| 62 | 62 | |
| 63 | 63 | // ------------------------------------------------------------------------ | 
| @@ -85,8 +85,8 @@ discard block | ||
| 85 | 85 | */ | 
| 86 | 86 | public function isAjax() | 
| 87 | 87 |      { | 
| 88 | - return ( ! empty($_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) && | |
| 89 | - strtolower($_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) === 'xmlhttprequest'); | |
| 88 | + return ( ! empty($_SERVER['HTTP_X_REQUESTED_WITH']) && | |
| 89 | + strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'); | |
| 90 | 90 | } | 
| 91 | 91 | |
| 92 | 92 | //-------------------------------------------------------------------- | 
| @@ -99,12 +99,12 @@ discard block | ||
| 99 | 99 | */ | 
| 100 | 100 | public function isSecure() | 
| 101 | 101 |      { | 
| 102 | -        if ( ! empty($_SERVER[ 'HTTPS' ]) && strtolower($_SERVER[ 'HTTPS' ]) !== 'off') { | |
| 102 | +        if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') { | |
| 103 | 103 | return true; | 
| 104 | -        } elseif (isset($_SERVER[ 'HTTP_X_FORWARDED_PROTO' ]) && $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] === 'https') { | |
| 104 | +        } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { | |
| 105 | 105 | return true; | 
| 106 | - } elseif ( ! empty($_SERVER[ 'HTTP_FRONT_END_HTTPS' ]) && strtolower( | |
| 107 | - $_SERVER[ 'HTTP_FRONT_END_HTTPS' ] | |
| 106 | + } elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower( | |
| 107 | + $_SERVER['HTTP_FRONT_END_HTTPS'] | |
| 108 | 108 | ) !== 'off' | 
| 109 | 109 |          ) { | 
| 110 | 110 | return true; | 
| @@ -125,8 +125,8 @@ discard block | ||
| 125 | 125 | public function getTime($format = null) | 
| 126 | 126 |      { | 
| 127 | 127 | return isset($format) | 
| 128 | - ? date($format, $_SERVER[ 'REQUEST_TIME' ]) | |
| 129 | - : $_SERVER[ 'REQUEST_TIME' ]; | |
| 128 | + ? date($format, $_SERVER['REQUEST_TIME']) | |
| 129 | + : $_SERVER['REQUEST_TIME']; | |
| 130 | 130 | } | 
| 131 | 131 | |
| 132 | 132 | //-------------------------------------------------------------------- | 
| @@ -208,12 +208,12 @@ discard block | ||
| 208 | 208 | |
| 209 | 209 | $uri = $this->uri; | 
| 210 | 210 | |
| 211 | -        if (isset($parseTarget[ 'path' ])) { | |
| 212 | - $uri = $this->uri->withPath($parseTarget[ 'path' ]); | |
| 211 | +        if (isset($parseTarget['path'])) { | |
| 212 | + $uri = $this->uri->withPath($parseTarget['path']); | |
| 213 | 213 | } | 
| 214 | 214 | |
| 215 | -        if (isset($parseTarget[ 'query' ])) { | |
| 216 | - $uri = $this->uri->withPath($parseTarget[ 'query' ]); | |
| 215 | +        if (isset($parseTarget['query'])) { | |
| 216 | + $uri = $this->uri->withPath($parseTarget['query']); | |
| 217 | 217 | } | 
| 218 | 218 | |
| 219 | 219 | $this->uri = $uri; | 
| @@ -140,6 +140,6 @@ | ||
| 140 | 140 | */ | 
| 141 | 141 | public function addCommander(AbstractCommander $commander) | 
| 142 | 142 |      { | 
| 143 | - $this->commandersPool[ $commander->getCommandName() ] = $commander; | |
| 143 | + $this->commandersPool[$commander->getCommandName()] = $commander; | |
| 144 | 144 | } | 
| 145 | 145 | } | 
| 146 | 146 | \ No newline at end of file | 
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 | |
| 61 | 61 |          if (property_exists($this, 'contextualClassColorMap')) { | 
| 62 | 62 |              if (array_key_exists($class, $this->contextualClassColorMap)) { | 
| 63 | - $this->setColor(new Color($this->contextualClassColorMap[ $class ])); | |
| 63 | + $this->setColor(new Color($this->contextualClassColorMap[$class])); | |
| 64 | 64 | } | 
| 65 | 65 | } | 
| 66 | 66 | |
| @@ -99,7 +99,7 @@ discard block | ||
| 99 | 99 | */ | 
| 100 | 100 | public function setHeaders(array $headers) | 
| 101 | 101 |      { | 
| 102 | - $this->rows[ self::HEADER_INDEX ] = $headers; | |
| 102 | + $this->rows[self::HEADER_INDEX] = $headers; | |
| 103 | 103 | |
| 104 | 104 | return $this; | 
| 105 | 105 | } | 
| @@ -117,7 +117,7 @@ discard block | ||
| 117 | 117 | */ | 
| 118 | 118 | public function addHeader($content = '') | 
| 119 | 119 |      { | 
| 120 | - $this->rows[ self::HEADER_INDEX ][] = $content; | |
| 120 | + $this->rows[self::HEADER_INDEX][] = $content; | |
| 121 | 121 | |
| 122 | 122 | return $this; | 
| 123 | 123 | } | 
| @@ -133,8 +133,8 @@ discard block | ||
| 133 | 133 | */ | 
| 134 | 134 | public function getHeaders() | 
| 135 | 135 |      { | 
| 136 | - return isset($this->rows[ self::HEADER_INDEX ]) | |
| 137 | - ? $this->rows[ self::HEADER_INDEX ] | |
| 136 | + return isset($this->rows[self::HEADER_INDEX]) | |
| 137 | + ? $this->rows[self::HEADER_INDEX] | |
| 138 | 138 | : null; | 
| 139 | 139 | } | 
| 140 | 140 | |
| @@ -154,7 +154,7 @@ discard block | ||
| 154 | 154 | $this->rowIndex++; | 
| 155 | 155 |          if (is_array($data)) { | 
| 156 | 156 |              foreach ($data as $column => $content) { | 
| 157 | - $this->rows[ $this->rowIndex ][ $column ] = $content; | |
| 157 | + $this->rows[$this->rowIndex][$column] = $content; | |
| 158 | 158 | } | 
| 159 | 159 | } | 
| 160 | 160 | |
| @@ -178,11 +178,11 @@ discard block | ||
| 178 | 178 | ? $this->rowIndex | 
| 179 | 179 | : $rowIndex; | 
| 180 | 180 |          if ($columnIndex === null) { | 
| 181 | - $columnIndex = isset($this->rows[ $rowIndex ]) | |
| 182 | - ? count($this->rows[ $rowIndex ]) | |
| 181 | + $columnIndex = isset($this->rows[$rowIndex]) | |
| 182 | + ? count($this->rows[$rowIndex]) | |
| 183 | 183 | : 0; | 
| 184 | 184 | } | 
| 185 | - $this->rows[ $rowIndex ][ $columnIndex ] = $content; | |
| 185 | + $this->rows[$rowIndex][$columnIndex] = $content; | |
| 186 | 186 | |
| 187 | 187 | return $this; | 
| 188 | 188 | } | 
| @@ -282,11 +282,11 @@ discard block | ||
| 282 | 282 |      { | 
| 283 | 283 |          foreach ($this->rows as $rowIndex => $row) { | 
| 284 | 284 |              foreach ($row as $columnIndex => $column) { | 
| 285 | -                if ( ! isset($this->columnWidths[ $columnIndex ])) { | |
| 286 | - $this->columnWidths[ $columnIndex ] = strlen($column); | |
| 285 | +                if ( ! isset($this->columnWidths[$columnIndex])) { | |
| 286 | + $this->columnWidths[$columnIndex] = strlen($column); | |
| 287 | 287 |                  } else { | 
| 288 | -                    if (strlen($column) > $this->columnWidths[ $columnIndex ]) { | |
| 289 | - $this->columnWidths[ $columnIndex ] = strlen($column); | |
| 288 | +                    if (strlen($column) > $this->columnWidths[$columnIndex]) { | |
| 289 | + $this->columnWidths[$columnIndex] = strlen($column); | |
| 290 | 290 | } | 
| 291 | 291 | } | 
| 292 | 292 | } | 
| @@ -307,7 +307,7 @@ discard block | ||
| 307 | 307 | private function renderBorder() | 
| 308 | 308 |      { | 
| 309 | 309 | $output = ''; | 
| 310 | - $columnCount = count($this->rows[ 0 ]); | |
| 310 | + $columnCount = count($this->rows[0]); | |
| 311 | 311 |          for ($col = 0; $col < $columnCount; $col++) { | 
| 312 | 312 | $output .= $this->renderCell($col); | 
| 313 | 313 | } | 
| @@ -334,9 +334,9 @@ discard block | ||
| 334 | 334 | private function renderCell($index, $row = null) | 
| 335 | 335 |      { | 
| 336 | 336 | $cell = $row | 
| 337 | - ? $row[ $index ] | |
| 337 | + ? $row[$index] | |
| 338 | 338 | : '-'; | 
| 339 | - $width = $this->columnWidths[ $index ]; | |
| 339 | + $width = $this->columnWidths[$index]; | |
| 340 | 340 | $pad = $row | 
| 341 | 341 | ? $width - strlen($cell) | 
| 342 | 342 | : $width; | 
| @@ -153,7 +153,7 @@ | ||
| 153 | 153 | $lines = []; | 
| 154 | 154 | |
| 155 | 155 |          for ($i = 0; $i < $this->numbers; $i++) { | 
| 156 | - $lines[ $i ] = $this->color->paint(str_repeat($this->string, $this->width)); | |
| 156 | + $lines[$i] = $this->color->paint(str_repeat($this->string, $this->width)); | |
| 157 | 157 | } | 
| 158 | 158 | |
| 159 | 159 | return str_repeat(PHP_EOL, $this->newLinesBefore) . implode(PHP_EOL, $lines) . str_repeat(PHP_EOL, | 
| @@ -57,7 +57,7 @@ discard block | ||
| 57 | 57 | return; | 
| 58 | 58 | } | 
| 59 | 59 | |
| 60 | - $_POST[ $name ] = $standardInput; | |
| 60 | + $_POST[$name] = $standardInput; | |
| 61 | 61 | } | 
| 62 | 62 | |
| 63 | 63 | // ------------------------------------------------------------------------ | 
| @@ -97,7 +97,7 @@ discard block | ||
| 97 | 97 | return; | 
| 98 | 98 | } | 
| 99 | 99 | |
| 100 | - $_POST[ $name ] = (bool)($standardInput === 'Y'); | |
| 100 | + $_POST[$name] = (bool)($standardInput === 'Y'); | |
| 101 | 101 | } | 
| 102 | 102 | |
| 103 | 103 | // ------------------------------------------------------------------------ | 
| @@ -119,7 +119,7 @@ discard block | ||
| 119 | 119 | $choices = []; | 
| 120 | 120 | $i = 1; | 
| 121 | 121 |          foreach ($options as $value => $label) { | 
| 122 | - $choices[ $i ] = $value; | |
| 122 | + $choices[$i] = $value; | |
| 123 | 123 | output()->write( | 
| 124 | 124 | (new Format()) | 
| 125 | 125 |                      ->setString('(' . $i . ') ' . language()->getLine($label)) | 
| @@ -166,6 +166,6 @@ discard block | ||
| 166 | 166 | return; | 
| 167 | 167 | } | 
| 168 | 168 | |
| 169 | - $_POST[ $name ] = $choices[ $standardInput ]; | |
| 169 | + $_POST[$name] = $choices[$standardInput]; | |
| 170 | 170 | } | 
| 171 | 171 | } | 
| 172 | 172 | \ No newline at end of file |