Completed
Push — 6.0 ( 8661a3...f9d0f5 )
by yun
06:28
created
src/think/Db.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
tests/DbTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.