@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think\middleware; |
14 | 14 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | if ($lang->defaultLangSet() != $langset) { |
41 | 41 | // 加载系统语言包 |
42 | 42 | $lang->load([ |
43 | - $app->getThinkPath() . 'lang' . DIRECTORY_SEPARATOR . $langset . '.php', |
|
43 | + $app->getThinkPath().'lang'.DIRECTORY_SEPARATOR.$langset.'.php', |
|
44 | 44 | ]); |
45 | 45 | |
46 | 46 | $app->LoadLangPack($langset); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | $target = $this->getTargetFile($directory, $name); |
48 | 48 | |
49 | - set_error_handler(function ($type, $msg) use (&$error) { |
|
49 | + set_error_handler(function($type, $msg) use (&$error) { |
|
50 | 50 | $error = $msg; |
51 | 51 | }); |
52 | 52 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think; |
14 | 14 | |
@@ -310,11 +310,11 @@ discard block |
||
310 | 310 | $query = $this->queryInstance; |
311 | 311 | } else { |
312 | 312 | $query = $this->db->buildQuery($this->connection) |
313 | - ->name($this->name . $this->suffix) |
|
313 | + ->name($this->name.$this->suffix) |
|
314 | 314 | ->pk($this->pk); |
315 | 315 | |
316 | 316 | if (!empty($this->table)) { |
317 | - $query->table($this->table . $this->suffix); |
|
317 | + $query->table($this->table.$this->suffix); |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 | |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | $this->field = array_keys(array_merge($this->schema, $this->jsonType)); |
516 | 516 | } else { |
517 | 517 | $query = $this->db(); |
518 | - $table = $this->table ? $this->table . $this->suffix : $query->getTable(); |
|
518 | + $table = $this->table ? $this->table.$this->suffix : $query->getTable(); |
|
519 | 519 | |
520 | 520 | $this->field = $query->getConnection()->getTableFields($table); |
521 | 521 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think; |
14 | 14 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | protected function getEnv(string $name, $default = null) |
68 | 68 | { |
69 | - $result = getenv('PHP_' . $name); |
|
69 | + $result = getenv('PHP_'.$name); |
|
70 | 70 | |
71 | 71 | if (false === $result) { |
72 | 72 | return $default; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | foreach ($env as $key => $val) { |
101 | 101 | if (is_array($val)) { |
102 | 102 | foreach ($val as $k => $v) { |
103 | - $this->data[$key . '_' . strtoupper($k)] = $v; |
|
103 | + $this->data[$key.'_'.strtoupper($k)] = $v; |
|
104 | 104 | } |
105 | 105 | } else { |
106 | 106 | $this->data[$key] = $val; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think\contract; |
14 | 14 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think\contract; |
14 | 14 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think\contract; |
14 | 14 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: yunwuxin <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think; |
14 | 14 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $commands = is_array($commands) ? $commands : func_get_args(); |
45 | 45 | |
46 | - Console::starting(function (Console $console) use ($commands) { |
|
46 | + Console::starting(function(Console $console) use ($commands) { |
|
47 | 47 | $console->addCommands($commands); |
48 | 48 | }); |
49 | 49 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think; |
14 | 14 | |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | */ |
385 | 385 | public function domain(bool $port = false): string |
386 | 386 | { |
387 | - return $this->scheme() . '://' . $this->host($port); |
|
387 | + return $this->scheme().'://'.$this->host($port); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | /** |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | if (!$root) { |
400 | 400 | $item = explode('.', $this->host()); |
401 | 401 | $count = count($item); |
402 | - $root = $count > 1 ? $item[$count - 2] . '.' . $item[$count - 1] : $item[0]; |
|
402 | + $root = $count > 1 ? $item[$count - 2].'.'.$item[$count - 1] : $item[0]; |
|
403 | 403 | } |
404 | 404 | |
405 | 405 | return $root; |
@@ -487,14 +487,14 @@ discard block |
||
487 | 487 | } elseif ($this->server('REQUEST_URI')) { |
488 | 488 | $url = $this->server('REQUEST_URI'); |
489 | 489 | } elseif ($this->server('ORIG_PATH_INFO')) { |
490 | - $url = $this->server('ORIG_PATH_INFO') . (!empty($this->server('QUERY_STRING')) ? '?' . $this->server('QUERY_STRING') : ''); |
|
490 | + $url = $this->server('ORIG_PATH_INFO').(!empty($this->server('QUERY_STRING')) ? '?'.$this->server('QUERY_STRING') : ''); |
|
491 | 491 | } elseif (isset($_SERVER['argv'][1])) { |
492 | 492 | $url = $_SERVER['argv'][1]; |
493 | 493 | } else { |
494 | 494 | $url = ''; |
495 | 495 | } |
496 | 496 | |
497 | - return $complete ? $this->domain() . $url : $url; |
|
497 | + return $complete ? $this->domain().$url : $url; |
|
498 | 498 | } |
499 | 499 | |
500 | 500 | /** |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | $this->baseUrl = strpos($str, '?') ? strstr($str, '?', true) : $str; |
523 | 523 | } |
524 | 524 | |
525 | - return $complete ? $this->domain() . $this->baseUrl : $this->baseUrl; |
|
525 | + return $complete ? $this->domain().$this->baseUrl : $this->baseUrl; |
|
526 | 526 | } |
527 | 527 | |
528 | 528 | /** |
@@ -543,8 +543,8 @@ discard block |
||
543 | 543 | $url = $this->server('PHP_SELF'); |
544 | 544 | } elseif (basename($this->server('ORIG_SCRIPT_NAME')) === $script_name) { |
545 | 545 | $url = $this->server('ORIG_SCRIPT_NAME'); |
546 | - } elseif (($pos = strpos($this->server('PHP_SELF'), '/' . $script_name)) !== false) { |
|
547 | - $url = substr($this->server('SCRIPT_NAME'), 0, $pos) . '/' . $script_name; |
|
546 | + } elseif (($pos = strpos($this->server('PHP_SELF'), '/'.$script_name)) !== false) { |
|
547 | + $url = substr($this->server('SCRIPT_NAME'), 0, $pos).'/'.$script_name; |
|
548 | 548 | } elseif ($this->server('DOCUMENT_ROOT') && strpos($this->server('SCRIPT_FILENAME'), $this->server('DOCUMENT_ROOT')) === 0) { |
549 | 549 | $url = str_replace('\\', '/', str_replace($this->server('DOCUMENT_ROOT'), '', $this->server('SCRIPT_FILENAME'))); |
550 | 550 | } |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | $this->baseFile = $url; |
553 | 553 | } |
554 | 554 | |
555 | - return $complete ? $this->domain() . $this->baseFile : $this->baseFile; |
|
555 | + return $complete ? $this->domain().$this->baseFile : $this->baseFile; |
|
556 | 556 | } |
557 | 557 | |
558 | 558 | /** |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | $this->root = rtrim($file, '/'); |
584 | 584 | } |
585 | 585 | |
586 | - return $complete ? $this->domain() . $this->root : $this->root; |
|
586 | + return $complete ? $this->domain().$this->root : $this->root; |
|
587 | 587 | } |
588 | 588 | |
589 | 589 | /** |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | $root = strpos($base, '.') ? ltrim(dirname($base), DIRECTORY_SEPARATOR) : $base; |
598 | 598 | |
599 | 599 | if ('' != $root) { |
600 | - $root = '/' . ltrim($root, '/'); |
|
600 | + $root = '/'.ltrim($root, '/'); |
|
601 | 601 | } |
602 | 602 | |
603 | 603 | return $root; |
@@ -1334,7 +1334,7 @@ discard block |
||
1334 | 1334 | if (is_scalar($data)) { |
1335 | 1335 | $data = (string) $data; |
1336 | 1336 | } else { |
1337 | - throw new \InvalidArgumentException('variable type error:' . gettype($data)); |
|
1337 | + throw new \InvalidArgumentException('variable type error:'.gettype($data)); |
|
1338 | 1338 | } |
1339 | 1339 | break; |
1340 | 1340 | } |