Completed
Push — master ( e44201...7c00aa )
by Ivannis Suárez
04:26
created
Tests/Fixtures/Event/UserEventSubscriber.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @param LoginUserEvent $event
29 29
      *
30
-     * @return bool
30
+     * @return boolean|null
31 31
      */
32 32
     public function onLogin(LoginUserEvent $event)
33 33
     {
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * @param LoginUserEvent $event
39 39
      *
40
-     * @return bool
40
+     * @return boolean|null
41 41
      */
42 42
     public function onLoginSuccess(LoginUserEvent $event)
43 43
     {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * @param Event $event
49 49
      *
50
-     * @return bool
50
+     * @return boolean|null
51 51
      */
52 52
     public function onFoo(Event $event)
53 53
     {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * @param Event $event
58 58
      *
59
-     * @return bool
59
+     * @return boolean|null
60 60
      */
61 61
     public function onBar(Event $event)
62 62
     {
Please login to merge, or discard this patch.
Middlewares/Locking/LockingMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function handle($message, callable $next)
42 42
     {
43
-        $this->queue[] = Delegate::fromClosure(function () use ($message, $next) {
43
+        $this->queue[] = Delegate::fromClosure(function() use ($message, $next) {
44 44
             return $next($message);
45 45
         });
46 46
 
Please login to merge, or discard this patch.
Bus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             }
155 155
         }
156 156
 
157
-        $next = Delegate::fromClosure(function ($message) {
157
+        $next = Delegate::fromClosure(function($message) {
158 158
             // the final middleware return the same message
159 159
             return $message;
160 160
         });
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         // reverse iteration over middlewares
163 163
         /** @var MiddlewareInterface $middleware */
164 164
         while ($middleware = array_pop($middlewares)) {
165
-            $next = Delegate::fromClosure(function ($message) use ($middleware, $next) {
165
+            $next = Delegate::fromClosure(function($message) use ($middleware, $next) {
166 166
                 return $middleware->handle($message, $next);
167 167
             });
168 168
         }
Please login to merge, or discard this patch.
Middlewares/Handler/Resolver/HandlerClass/HandlerClassResolverTests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             )
60 60
             ->and($resolver->addHandler(LoginUserCommand::class, new LoginUserCommandHandler()))
61 61
             ->then()
62
-                ->exception(function () use ($resolver) {
62
+                ->exception(function() use ($resolver) {
63 63
                     $resolver->resolve(new LogoutUserCommand('[email protected]'));
64 64
                 })
65 65
                 ->isInstanceOf(NotFoundException::class)
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 )
75 75
             )
76 76
             ->then()
77
-                ->exception(function () use ($resolver) {
77
+                ->exception(function() use ($resolver) {
78 78
                     $resolver->resolve(new LoginUserCommand('[email protected]', 'plainpassword'));
79 79
                 })
80 80
                 ->isInstanceOf(NotFoundException::class)
Please login to merge, or discard this patch.
Tests/Units/Middlewares/Handler/Locator/InMemoryLocatorTests.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
         $this
41 41
             ->given($handler = new LoginUserCommandHandler())
42 42
             ->then()
43
-                ->exception(function () use ($handler) {
43
+                ->exception(function() use ($handler) {
44 44
                     new InMemoryLocator([255 => $handler]);
45 45
                 })
46 46
                 ->isInstanceOf(\InvalidArgumentException::class)
47
-                ->exception(function () use ($handler) {
47
+                ->exception(function() use ($handler) {
48 48
                     new InMemoryLocator([LoginUserCommand::class => 255]);
49 49
                 })
50 50
                 ->isInstanceOf(\InvalidArgumentException::class)
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             ->then()
65 65
                 ->object($result)
66 66
                     ->isEqualTo($handler)
67
-                ->exception(function () use ($locator) {
67
+                ->exception(function() use ($locator) {
68 68
                     $locator->locate('Foo');
69 69
                 })
70 70
                 ->isInstanceOf(NotFoundException::class)
Please login to merge, or discard this patch.
Tests/Units/BusTests.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $this
30 30
             ->given($middleware = new LockingMiddleware())
31 31
             ->then()
32
-                ->exception(function () use ($middleware) {
32
+                ->exception(function() use ($middleware) {
33 33
                     new Bus([$middleware, new \StdClass()]);
34 34
                 })
35 35
                 ->isInstanceOf(InvalidMiddlewareException::class)
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             ->given($middleware = new LockingMiddleware())
70 70
             ->and($bus = new Bus())
71 71
             ->then()
72
-                ->exception(function () use ($bus, $middleware) {
72
+                ->exception(function() use ($bus, $middleware) {
73 73
                     $bus->addMiddlewareBefore($middleware, $middleware);
74 74
                 })->isInstanceOf(\InvalidArgumentException::class)
75 75
         ;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             ->given($middleware = new LockingMiddleware())
94 94
             ->and($bus = new Bus())
95 95
             ->then()
96
-                ->exception(function () use ($bus, $middleware) {
96
+                ->exception(function() use ($bus, $middleware) {
97 97
                     $bus->addMiddlewareAfter($middleware, $middleware);
98 98
                 })->isInstanceOf(\InvalidArgumentException::class)
99 99
         ;
Please login to merge, or discard this patch.
Units/Middlewares/Handler/Resolver/HandlerMethodName/ChainResolverTests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this
35 35
             ->given($resolver1 = new \StdClass())
36 36
             ->then()
37
-                ->exception(function () use ($resolver1) {
37
+                ->exception(function() use ($resolver1) {
38 38
                     new ChainResolver([$resolver1]);
39 39
                 })
40 40
                 ->isInstanceOf(InvalidResolverException::class)
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $this
65 65
             ->given($resolver = new ChainResolver([]))
66 66
             ->then()
67
-                ->exception(function () use ($resolver) {
67
+                ->exception(function() use ($resolver) {
68 68
                     $resolver->resolve(new LogoutUserCommand('[email protected]'));
69 69
                 })
70 70
                 ->isInstanceOf(NotFoundException::class)
Please login to merge, or discard this patch.
Tests/Units/Event/EventBusTests.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             ->given($middleware = new LockingMiddleware())
37 37
             ->and($eventBus = new EventBus([$middleware]))
38 38
             ->then()
39
-                ->exception(function () use ($eventBus) {
39
+                ->exception(function() use ($eventBus) {
40 40
                     $eventBus->dispatch(new LoginUserEvent('[email protected]'));
41 41
                 })
42 42
                 ->isInstanceOf(NotFoundException::class)
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $this
52 52
             ->given($eventBus = EventBus::create())
53 53
             ->and($event = new LoginUserEvent('[email protected]'))
54
-            ->and($eventBus->addListener($event->eventName(), function (LoginUserEvent $event) {
54
+            ->and($eventBus->addListener($event->eventName(), function(LoginUserEvent $event) {
55 55
                 $this
56 56
                     ->string($event->email())
57 57
                     ->isEqualTo('[email protected]')
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $this
75 75
             ->given($eventBus = EventBus::create())
76 76
             ->then()
77
-                ->exception(function () use ($eventBus) {
77
+                ->exception(function() use ($eventBus) {
78 78
                     $eventBus->dispatch(new FooMessage());
79 79
                 })
80 80
                 ->isInstanceOf(\InvalidArgumentException::class)
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
         $this
104 104
             ->given($eventBus = EventBus::create())
105 105
             ->and($eventBus->addListener('event.foo', array(new LoginUserEventListener(), 'onLogin')))
106
-            ->and($eventBus->addListener('event.foo', function (Event $event) {
106
+            ->and($eventBus->addListener('event.foo', function(Event $event) {
107 107
 
108 108
             }))
109
-            ->and($eventBus->addListener('event.bar', function (Event $event) {
109
+            ->and($eventBus->addListener('event.bar', function(Event $event) {
110 110
 
111 111
             }))
112 112
             ->when($listeners = $eventBus->listeners())
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
         $this
131 131
             ->given($eventBus = EventBus::create())
132 132
             ->and($listener1 = array(new LoginUserEventListener(), 'onLogin'))
133
-            ->and($listener2 = function (Event $event) {
133
+            ->and($listener2 = function(Event $event) {
134 134
                 return $event->eventName();
135 135
             })
136
-            ->and($listener3 = function (Event $event) {
136
+            ->and($listener3 = function(Event $event) {
137 137
 
138 138
             })
139 139
             ->and($eventBus->addListener('event.foo', $listener1, 100))
Please login to merge, or discard this patch.
Tests/Units/Middlewares/EventDispatcher/EventDispatcherMiddlewareTests.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             ->and($middleware = new EventDispatcherMiddleware($dispatcher))
34 34
             ->and($event = new LoginUserEvent('[email protected]'))
35 35
             ->and($dispatcher->addListener($event->eventName(), array(new LoginUserEventListener(), 'onLogin')))
36
-            ->and($dispatcher->addListener($event->eventName(), function (LoginUserEvent $event) {
36
+            ->and($dispatcher->addListener($event->eventName(), function(LoginUserEvent $event) {
37 37
                 $this
38 38
                     ->string($event->email())
39 39
                     ->isEqualTo('[email protected]')
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 
42 42
                 $event->setEmail('[email protected]');
43 43
             }))
44
-            ->and($callable = function (LoginUserEvent $event) {
44
+            ->and($callable = function(LoginUserEvent $event) {
45 45
                 $event->setEmail('[email protected]');
46 46
             })
47 47
             ->when($result = $middleware->handle($event, $callable))
48 48
             ->then()
49 49
                 ->string($event->email())
50 50
                     ->isEqualTo('[email protected]')
51
-                ->exception(function () use ($middleware, $callable) {
51
+                ->exception(function() use ($middleware, $callable) {
52 52
                     $middleware->handle(new \StdClass(), $callable);
53 53
                 })->isInstanceOf(\InvalidArgumentException::class)
54 54
         ;
Please login to merge, or discard this patch.