@@ -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 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (!isset($this->config['channels'][$name])) { |
| 99 | - throw new InvalidArgumentException('Undefined log config:' . $name); |
|
| 99 | + throw new InvalidArgumentException('Undefined log config:'.$name); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $this->channel = $name; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | if (is_string($msg) && !empty($context)) { |
| 153 | 153 | $replace = []; |
| 154 | 154 | foreach ($context as $key => $val) { |
| 155 | - $replace['{' . $key . '}'] = $val; |
|
| 155 | + $replace['{'.$key.'}'] = $val; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | $msg = strtr($msg, $replace); |
@@ -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 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | if ($force || !isset($this->instance[$name])) { |
| 103 | 103 | if (!isset($this->config['connections'][$name])) { |
| 104 | - throw new InvalidArgumentException('Undefined db config:' . $name); |
|
| 104 | + throw new InvalidArgumentException('Undefined db config:'.$name); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | $config = $this->config['connections'][$name]; |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | public function event(string $event, callable $callback): void |
| 219 | 219 | { |
| 220 | 220 | if ($this->event) { |
| 221 | - $this->event->listen('db.' . $event, $callback); |
|
| 221 | + $this->event->listen('db.'.$event, $callback); |
|
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | public function trigger(string $event, $params = null, bool $once = false) |
| 234 | 234 | { |
| 235 | 235 | if ($this->event) { |
| 236 | - return $this->event->trigger('db.' . $event, $params, $once); |
|
| 236 | + return $this->event->trigger('db.'.$event, $params, $once); |
|
| 237 | 237 | } |
| 238 | 238 | } |
| 239 | 239 | |
@@ -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 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | if ($force || !isset($this->instance[$name])) { |
| 81 | 81 | if (!isset($this->config['stores'][$name])) { |
| 82 | - throw new InvalidArgumentException('Undefined cache config:' . $name); |
|
| 82 | + throw new InvalidArgumentException('Undefined cache config:'.$name); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | $options = $this->config['stores'][$name]; |