@@ -27,7 +27,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -40,7 +40,7 @@ |
||
| 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 | |
@@ -154,7 +154,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $this |
| 34 | 34 | ->given($resolver1 = new \StdClass()) |
| 35 | 35 | ->then() |
| 36 | - ->exception(function () use ($resolver1) { |
|
| 36 | + ->exception(function() use ($resolver1) { |
|
| 37 | 37 | new ChainResolver([$resolver1]); |
| 38 | 38 | }) |
| 39 | 39 | ->isInstanceOf(InvalidResolverException::class) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $this |
| 68 | 68 | ->given($resolver = new ChainResolver([])) |
| 69 | 69 | ->then() |
| 70 | - ->exception(function () use ($resolver) { |
|
| 70 | + ->exception(function() use ($resolver) { |
|
| 71 | 71 | $resolver->resolve(new NearbyVenuesQuery($this->faker->latitude(), $this->faker->longitude())); |
| 72 | 72 | }) |
| 73 | 73 | ->isInstanceOf(NotFoundException::class) |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $this |
| 42 | 42 | ->given($resolver = new FromQueryNamedResolver()) |
| 43 | 43 | ->then() |
| 44 | - ->exception(function () use ($resolver) { |
|
| 44 | + ->exception(function() use ($resolver) { |
|
| 45 | 45 | $resolver->resolve(new PublishedPostsQuery(new \DateTime())); |
| 46 | 46 | }) |
| 47 | 47 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -59,7 +59,7 @@ discard block |
||
| 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 |
||
| 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) |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $this |
| 36 | 36 | ->given($resolver1 = new \StdClass()) |
| 37 | 37 | ->then() |
| 38 | - ->exception(function () use ($resolver1) { |
|
| 38 | + ->exception(function() use ($resolver1) { |
|
| 39 | 39 | new ChainResolver([$resolver1]); |
| 40 | 40 | }) |
| 41 | 41 | ->isInstanceOf(InvalidResolverException::class) |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this |
| 62 | 62 | ->given($resolver = new ChainResolver([])) |
| 63 | 63 | ->then() |
| 64 | - ->exception(function () use ($resolver) { |
|
| 64 | + ->exception(function() use ($resolver) { |
|
| 65 | 65 | $resolver->resolve(new LogoutUserCommand('[email protected]')); |
| 66 | 66 | }) |
| 67 | 67 | ->isInstanceOf(NotFoundException::class) |
@@ -34,7 +34,7 @@ discard block |
||
| 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 |
||
| 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) |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $this |
| 39 | 39 | ->given($resolver = new FromCommandNamedResolver()) |
| 40 | 40 | ->then() |
| 41 | - ->exception(function () use ($resolver) { |
|
| 41 | + ->exception(function() use ($resolver) { |
|
| 42 | 42 | $resolver->resolve(new LoginUserCommand('[email protected]', 'plainpassword')); |
| 43 | 43 | }) |
| 44 | 44 | ->isInstanceOf(\InvalidArgumentException::class) |