@@ -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 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function getConfig(string $name = '', $default = null) |
69 | 69 | { |
70 | 70 | if ('' !== $name) { |
71 | - return $this->config->get('database.' . $name, $default); |
|
71 | + return $this->config->get('database.'.$name, $default); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return $this->config->get('database', []); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | public function event(string $event, callable $callback): void |
94 | 94 | { |
95 | 95 | if ($this->event) { |
96 | - $this->event->listen('db.' . $event, $callback); |
|
96 | + $this->event->listen('db.'.$event, $callback); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function trigger(string $event, $params = null, bool $once = false) |
109 | 109 | { |
110 | 110 | if ($this->event) { |
111 | - return $this->event->trigger('db.' . $event, $params, $once); |
|
111 | + return $this->event->trigger('db.'.$event, $params, $once); |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $config->shouldReceive('get')->with('database', [])->andReturn([]); |
33 | 33 | $this->assertEquals([], $db->getConfig()); |
34 | 34 | |
35 | - $callback = function () { |
|
35 | + $callback = function() { |
|
36 | 36 | }; |
37 | 37 | $event->shouldReceive('listen')->with('db.some', $callback); |
38 | 38 | $db->event('some', $callback); |