@@ -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 | |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | */ |
| 381 | 381 | public function domain(bool $port = false): string |
| 382 | 382 | { |
| 383 | - return $this->scheme() . '://' . $this->host($port); |
|
| 383 | + return $this->scheme().'://'.$this->host($port); |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | /** |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | if (!$root) { |
| 396 | 396 | $item = explode('.', $this->host()); |
| 397 | 397 | $count = count($item); |
| 398 | - $root = $count > 1 ? $item[$count - 2] . '.' . $item[$count - 1] : $item[0]; |
|
| 398 | + $root = $count > 1 ? $item[$count - 2].'.'.$item[$count - 1] : $item[0]; |
|
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | return $root; |
@@ -483,14 +483,14 @@ discard block |
||
| 483 | 483 | } elseif ($this->server('REQUEST_URI')) { |
| 484 | 484 | $url = $this->server('REQUEST_URI'); |
| 485 | 485 | } elseif ($this->server('ORIG_PATH_INFO')) { |
| 486 | - $url = $this->server('ORIG_PATH_INFO') . (!empty($this->server('QUERY_STRING')) ? '?' . $this->server('QUERY_STRING') : ''); |
|
| 486 | + $url = $this->server('ORIG_PATH_INFO').(!empty($this->server('QUERY_STRING')) ? '?'.$this->server('QUERY_STRING') : ''); |
|
| 487 | 487 | } elseif (isset($_SERVER['argv'][1])) { |
| 488 | 488 | $url = $_SERVER['argv'][1]; |
| 489 | 489 | } else { |
| 490 | 490 | $url = ''; |
| 491 | 491 | } |
| 492 | 492 | |
| 493 | - return $complete ? $this->domain() . $url : $url; |
|
| 493 | + return $complete ? $this->domain().$url : $url; |
|
| 494 | 494 | } |
| 495 | 495 | |
| 496 | 496 | /** |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | $this->baseUrl = strpos($str, '?') ? strstr($str, '?', true) : $str; |
| 519 | 519 | } |
| 520 | 520 | |
| 521 | - return $complete ? $this->domain() . $this->baseUrl : $this->baseUrl; |
|
| 521 | + return $complete ? $this->domain().$this->baseUrl : $this->baseUrl; |
|
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | /** |
@@ -539,8 +539,8 @@ discard block |
||
| 539 | 539 | $url = $this->server('PHP_SELF'); |
| 540 | 540 | } elseif (basename($this->server('ORIG_SCRIPT_NAME')) === $script_name) { |
| 541 | 541 | $url = $this->server('ORIG_SCRIPT_NAME'); |
| 542 | - } elseif (($pos = strpos($this->server('PHP_SELF'), '/' . $script_name)) !== false) { |
|
| 543 | - $url = substr($this->server('SCRIPT_NAME'), 0, $pos) . '/' . $script_name; |
|
| 542 | + } elseif (($pos = strpos($this->server('PHP_SELF'), '/'.$script_name)) !== false) { |
|
| 543 | + $url = substr($this->server('SCRIPT_NAME'), 0, $pos).'/'.$script_name; |
|
| 544 | 544 | } elseif ($this->server('DOCUMENT_ROOT') && strpos($this->server('SCRIPT_FILENAME'), $this->server('DOCUMENT_ROOT')) === 0) { |
| 545 | 545 | $url = str_replace('\\', '/', str_replace($this->server('DOCUMENT_ROOT'), '', $this->server('SCRIPT_FILENAME'))); |
| 546 | 546 | } |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | $this->baseFile = $url; |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | - return $complete ? $this->domain() . $this->baseFile : $this->baseFile; |
|
| 551 | + return $complete ? $this->domain().$this->baseFile : $this->baseFile; |
|
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | /** |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | $this->root = rtrim($file, '/'); |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | - return $complete ? $this->domain() . $this->root : $this->root; |
|
| 582 | + return $complete ? $this->domain().$this->root : $this->root; |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | /** |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | $root = strpos($base, '.') ? ltrim(dirname($base), DIRECTORY_SEPARATOR) : $base; |
| 594 | 594 | |
| 595 | 595 | if ('' != $root) { |
| 596 | - $root = '/' . ltrim($root, '/'); |
|
| 596 | + $root = '/'.ltrim($root, '/'); |
|
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | return $root; |
@@ -1336,7 +1336,7 @@ discard block |
||
| 1336 | 1336 | if (is_scalar($data)) { |
| 1337 | 1337 | $data = (string) $data; |
| 1338 | 1338 | } else { |
| 1339 | - throw new InvalidArgumentException('variable type error:' . gettype($data)); |
|
| 1339 | + throw new InvalidArgumentException('variable type error:'.gettype($data)); |
|
| 1340 | 1340 | } |
| 1341 | 1341 | break; |
| 1342 | 1342 | } |