@@ -40,7 +40,7 @@ |
||
| 40 | 40 | EncrypterConfig $config, |
| 41 | 41 | EncrypterManager $encrypterManager |
| 42 | 42 | ) { |
| 43 | - $envFilename = $directories->directory('root') . '.env'; |
|
| 43 | + $envFilename = $directories->directory('root').'.env'; |
|
| 44 | 44 | |
| 45 | 45 | if (!$files->exists($envFilename)) { |
| 46 | 46 | $this->writeln( |
@@ -52,20 +52,20 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function perform(DirectoriesInterface $directories) |
| 54 | 54 | { |
| 55 | - $host = $this->argument('host') . ':' . $this->option('port'); |
|
| 55 | + $host = $this->argument('host').':'.$this->option('port'); |
|
| 56 | 56 | |
| 57 | 57 | $this->writeln("<info>Development server started at <comment>{$host}</comment></info>"); |
| 58 | 58 | $this->writeln("Press <comment>Ctrl-C</comment> to quit."); |
| 59 | 59 | |
| 60 | 60 | $process = new Process( |
| 61 | - '"' . PHP_BINARY . "\" -S {$host} \"{$directories->directory('framework')}../server.php\"", |
|
| 61 | + '"'.PHP_BINARY."\" -S {$host} \"{$directories->directory('framework')}../server.php\"", |
|
| 62 | 62 | $directories->directory('public'), |
| 63 | 63 | null, |
| 64 | 64 | null, |
| 65 | 65 | $this->option('timeout') |
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | - $process->run(function ($type, $data) { |
|
| 68 | + $process->run(function($type, $data) { |
|
| 69 | 69 | if ($type != Process::ERR) { |
| 70 | 70 | //First character contains request type, second is space |
| 71 | 71 | if ($data[0] == 'S' || $this->isVerbosity()) { |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | ['[]' => '', '[/]' => '', '[' => '', ']' => '', '//' => '/'] |
| 264 | 264 | ); |
| 265 | 265 | |
| 266 | - $uri = new Uri(($this->withHost ? '' : $this->prefix) . rtrim($path, '/')); |
|
| 266 | + $uri = new Uri(($this->withHost ? '' : $this->prefix).rtrim($path, '/')); |
|
| 267 | 267 | |
| 268 | 268 | return empty($query) ? $uri : $uri->withQuery(http_build_query($query)); |
| 269 | 269 | } |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | $template = preg_replace('/<(\w+):?.*?>/', '<\1>', $this->pattern); |
| 381 | 381 | |
| 382 | 382 | $this->compiled = [ |
| 383 | - 'pattern' => '/^' . strtr($template, $replaces) . '$/iu', |
|
| 383 | + 'pattern' => '/^'.strtr($template, $replaces).'$/iu', |
|
| 384 | 384 | 'template' => stripslashes(str_replace('?', '', $template)), |
| 385 | 385 | 'options' => array_fill_keys($options, null) |
| 386 | 386 | ]; |
@@ -395,11 +395,11 @@ discard block |
||
| 395 | 395 | $path = $request->getUri()->getPath(); |
| 396 | 396 | |
| 397 | 397 | if (empty($path) || $path[0] !== '/') { |
| 398 | - $path = '/' . $path; |
|
| 398 | + $path = '/'.$path; |
|
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | if ($this->withHost) { |
| 402 | - $uri = $request->getUri()->getHost() . $path; |
|
| 402 | + $uri = $request->getUri()->getHost().$path; |
|
| 403 | 403 | } else { |
| 404 | 404 | $uri = substr($path, strlen($this->prefix)); |
| 405 | 405 | } |
@@ -217,7 +217,7 @@ |
||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | //VALUE.HMAC |
| 220 | - return $cookie->withValue($cookie->getValue() . $this->hmacSign($cookie->getValue())); |
|
| 220 | + return $cookie->withValue($cookie->getValue().$this->hmacSign($cookie->getValue())); |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | /** |
@@ -250,20 +250,20 @@ |
||
| 250 | 250 | public function createHeader() |
| 251 | 251 | { |
| 252 | 252 | $header = [ |
| 253 | - rawurlencode($this->name) . '=' . rawurlencode($this->value) |
|
| 253 | + rawurlencode($this->name).'='.rawurlencode($this->value) |
|
| 254 | 254 | ]; |
| 255 | 255 | |
| 256 | 256 | if ($this->lifetime !== null) { |
| 257 | - $header[] = 'Expires=' . gmdate(\DateTime::COOKIE, $this->getExpires()); |
|
| 258 | - $header[] = 'Max-Age=' . $this->lifetime; |
|
| 257 | + $header[] = 'Expires='.gmdate(\DateTime::COOKIE, $this->getExpires()); |
|
| 258 | + $header[] = 'Max-Age='.$this->lifetime; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | if (!empty($this->path)) { |
| 262 | - $header[] = 'Path=' . $this->path; |
|
| 262 | + $header[] = 'Path='.$this->path; |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | if (!empty($this->domain)) { |
| 266 | - $header[] = 'Domain=' . $this->domain; |
|
| 266 | + $header[] = 'Domain='.$this->domain; |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | if ($this->secure) { |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | if (!empty($port = $uri->getPort())) { |
| 169 | - $host = $host . ':' . $port; |
|
| 169 | + $host = $host.':'.$port; |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | if (strpos($pattern, '%s') === false) { |
@@ -11,17 +11,17 @@ |
||
| 11 | 11 | $out = fopen('php://stdout', 'w'); |
| 12 | 12 | |
| 13 | 13 | if ($_SERVER['REQUEST_METHOD'] == 'GET') { |
| 14 | - $logMessage = '[' . date('M d, Y H:i:s') . '] GET '; |
|
| 14 | + $logMessage = '['.date('M d, Y H:i:s').'] GET '; |
|
| 15 | 15 | } else { |
| 16 | - $logMessage = '[' . date('M d, Y H:i:s') . '] <fg=cyan>' . $_SERVER['REQUEST_METHOD'] . '</fg=cyan>'; |
|
| 16 | + $logMessage = '['.date('M d, Y H:i:s').'] <fg=cyan>'.$_SERVER['REQUEST_METHOD'].'</fg=cyan>'; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if ($requestURI !== '/' && file_exists(getcwd() . $requestURI)) { |
|
| 19 | +if ($requestURI !== '/' && file_exists(getcwd().$requestURI)) { |
|
| 20 | 20 | //CLI-Server will handle resources by itself. |
| 21 | - fwrite($out, 'R ' . $logMessage . ' ' . $requestURI); |
|
| 21 | + fwrite($out, 'R '.$logMessage.' '.$requestURI); |
|
| 22 | 22 | |
| 23 | 23 | return false; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -fwrite($out, 'S ' . $logMessage . ' <info>' . $_SERVER['REQUEST_URI'] . '</info>'); |
|
| 26 | +fwrite($out, 'S '.$logMessage.' <info>'.$_SERVER['REQUEST_URI'].'</info>'); |
|
| 27 | 27 | require_once 'index.php'; |
| 28 | 28 | \ No newline at end of file |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * Input argument. |
| 223 | 223 | * |
| 224 | 224 | * @param string $name |
| 225 | - * @return mixed |
|
| 225 | + * @return string|null |
|
| 226 | 226 | */ |
| 227 | 227 | protected function argument($name) |
| 228 | 228 | { |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | /** |
| 233 | 233 | * Table helper instance with configured header and pre-defined set of rows. |
| 234 | 234 | * |
| 235 | - * @param array $headers |
|
| 235 | + * @param string[] $headers |
|
| 236 | 236 | * @param array $rows |
| 237 | 237 | * @param string $style |
| 238 | 238 | * @return Table |
@@ -10,9 +10,6 @@ |
||
| 10 | 10 | use Spiral\Core\Component; |
| 11 | 11 | use Spiral\Debug\Traits\LoggerTrait; |
| 12 | 12 | use Spiral\Tokenizer\ClassesInterface; |
| 13 | -use Spiral\Tokenizer\ClassLocatorInterface; |
|
| 14 | -use Spiral\Tokenizer\InvocationInterface; |
|
| 15 | -use Spiral\Tokenizer\InvocationLocatorInterface; |
|
| 16 | 13 | use Spiral\Tokenizer\InvocationsInterface; |
| 17 | 14 | use Spiral\Tokenizer\Reflections\ReflectionArgument; |
| 18 | 15 | use Spiral\Tokenizer\Reflections\ReflectionInvocation; |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | $strings = []; |
| 215 | - array_walk_recursive($target, function ($value) use (&$strings) { |
|
| 215 | + array_walk_recursive($target, function($value) use (&$strings) { |
|
| 216 | 216 | if (is_string($value) && $this->hasBraces($value)) { |
| 217 | 217 | $strings[] = $this->removeBraces($value); |
| 218 | 218 | } |