Completed
Push — 6.0 ( 0ccc8d...e71200 )
by yun
05:51
created
tests/EventTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $this->event->bind(['foo' => 'baz']);
44 44
 
45
-        $this->event->listen('foo', function ($bar) {
45
+        $this->event->listen('foo', function($bar) {
46 46
             $this->assertEquals('bar', $bar);
47 47
         });
48 48
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function testOnceEvent()
59 59
     {
60
-        $this->event->listen('AppInit', function ($bar) {
60
+        $this->event->listen('AppInit', function($bar) {
61 61
             $this->assertEquals('bar', $bar);
62 62
             return 'foo';
63 63
         });
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $listener = m::mock("overload:SomeListener", TestListener::class);
83 83
 
84
-        $listener->shouldReceive('subscribe')->andReturnUsing(function (Event $event) use ($listener) {
84
+        $listener->shouldReceive('subscribe')->andReturnUsing(function(Event $event) use ($listener) {
85 85
 
86 86
             $listener->shouldReceive('onBar')->once()->andReturnFalse();
87 87
 
Please login to merge, or discard this patch.
src/think/Event.php 1 patch
Spacing   +2 added lines, -2 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
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         foreach ($methods as $method) {
223 223
             $name = $method->getName();
224 224
             if (0 === strpos($name, 'on')) {
225
-                $this->listen($eventPrefix . substr($name, 2), [$observer, $name]);
225
+                $this->listen($eventPrefix.substr($name, 2), [$observer, $name]);
226 226
             }
227 227
         }
228 228
 
Please login to merge, or discard this patch.