@@ -39,8 +39,8 @@ |
||
| 39 | 39 | /** |
| 40 | 40 | * LoginUserCommand constructor. |
| 41 | 41 | * |
| 42 | - * @param $email |
|
| 43 | - * @param $password |
|
| 42 | + * @param string $email |
|
| 43 | + * @param string $password |
|
| 44 | 44 | */ |
| 45 | 45 | public function __construct($email, $password) |
| 46 | 46 | { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | ->given($middleware = new LockingMiddleware()) |
| 37 | 37 | ->and($queryBus = new QueryBus([$middleware])) |
| 38 | 38 | ->then() |
| 39 | - ->exception(function () use ($queryBus) { |
|
| 39 | + ->exception(function() use ($queryBus) { |
|
| 40 | 40 | $queryBus->dispatch(new PublishedPostsQuery(new \DateTime())); |
| 41 | 41 | }) |
| 42 | 42 | ->isInstanceOf(NotFoundException::class) |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $this |
| 82 | 82 | ->given($queryBus = QueryBus::create()) |
| 83 | 83 | ->then() |
| 84 | - ->exception(function () use ($queryBus) { |
|
| 84 | + ->exception(function() use ($queryBus) { |
|
| 85 | 85 | $queryBus->dispatch(new FooMessage()); |
| 86 | 86 | }) |
| 87 | 87 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -40,14 +40,14 @@ |
||
| 40 | 40 | ) |
| 41 | 41 | ->and($middleware = new CommandHandlerMiddleware($resolver)) |
| 42 | 42 | ->and($command = new LoginUserCommand('[email protected]', 'plainpassword')) |
| 43 | - ->and($callable = function (LoginUserCommand $command) { |
|
| 43 | + ->and($callable = function(LoginUserCommand $command) { |
|
| 44 | 44 | $command->setEmail('[email protected]'); |
| 45 | 45 | }) |
| 46 | 46 | ->when($middleware->handle($command, $callable)) |
| 47 | 47 | ->then() |
| 48 | 48 | ->string($command->email()) |
| 49 | 49 | ->isEqualTo('[email protected]') |
| 50 | - ->exception(function () use ($middleware, $callable) { |
|
| 50 | + ->exception(function() use ($middleware, $callable) { |
|
| 51 | 51 | $middleware->handle(new \StdClass(), $callable); |
| 52 | 52 | })->isInstanceOf(\InvalidArgumentException::class) |
| 53 | 53 | ; |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this |
| 38 | 38 | ->given($resolver = new FromCommandNamedResolver()) |
| 39 | 39 | ->then() |
| 40 | - ->exception(function () use ($resolver) { |
|
| 40 | + ->exception(function() use ($resolver) { |
|
| 41 | 41 | $resolver->resolve(new LoginUserCommand('[email protected]', 'plainpassword')); |
| 42 | 42 | }) |
| 43 | 43 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ->and($query = new NearByVenuesQuery($this->faker->latitude(), $this->faker->longitude())) |
| 43 | 43 | ->and($queryHandler = new VenuesQueryHandler()) |
| 44 | 44 | ->and($resolver->addHandler($query->queryName(), $queryHandler)) |
| 45 | - ->and($callable = function (array $result) { |
|
| 45 | + ->and($callable = function(array $result) { |
|
| 46 | 46 | return json_encode($result); |
| 47 | 47 | }) |
| 48 | 48 | ->when($result = $middleware->handle($query, $callable)) |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | ->string($result) |
| 51 | 51 | ->isNotEmpty() |
| 52 | 52 | ->isEqualTo(json_encode($queryHandler->aroundVenues($query))) |
| 53 | - ->exception(function () use ($middleware, $callable) { |
|
| 53 | + ->exception(function() use ($middleware, $callable) { |
|
| 54 | 54 | $middleware->handle(new \StdClass(), $callable); |
| 55 | 55 | })->isInstanceOf(\InvalidArgumentException::class) |
| 56 | 56 | ; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | ->given($middleware = new LockingMiddleware()) |
| 36 | 36 | ->and($commandBus = new CommandBus([$middleware])) |
| 37 | 37 | ->then() |
| 38 | - ->exception(function () use ($commandBus) { |
|
| 38 | + ->exception(function() use ($commandBus) { |
|
| 39 | 39 | $commandBus->dispatch(new EncodePasswordCommand('plainpassword')); |
| 40 | 40 | }) |
| 41 | 41 | ->isInstanceOf(NotFoundException::class) |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $this |
| 97 | 97 | ->given($commandBus = CommandBus::create()) |
| 98 | 98 | ->then() |
| 99 | - ->exception(function () use ($commandBus) { |
|
| 99 | + ->exception(function() use ($commandBus) { |
|
| 100 | 100 | $commandBus->dispatch(new FooMessage()); |
| 101 | 101 | }) |
| 102 | 102 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this |
| 38 | 38 | ->given($resolver = new FromCommandNamedResolver()) |
| 39 | 39 | ->then() |
| 40 | - ->exception(function () use ($resolver) { |
|
| 40 | + ->exception(function() use ($resolver) { |
|
| 41 | 41 | $resolver->resolve(new LoginUserCommand('[email protected]', 'plainpassword')); |
| 42 | 42 | }) |
| 43 | 43 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this |
| 38 | 38 | ->given($resolver = new FromCommandNamedResolver()) |
| 39 | 39 | ->then() |
| 40 | - ->exception(function () use ($resolver) { |
|
| 40 | + ->exception(function() use ($resolver) { |
|
| 41 | 41 | $resolver->resolve(new LoginUserCommand('[email protected]', 'plainpassword')); |
| 42 | 42 | }) |
| 43 | 43 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this |
| 38 | 38 | ->given($resolver = new FromCommandNamedResolver()) |
| 39 | 39 | ->then() |
| 40 | - ->exception(function () use ($resolver) { |
|
| 40 | + ->exception(function() use ($resolver) { |
|
| 41 | 41 | $resolver->resolve(new LoginUserCommand('[email protected]', 'plainpassword')); |
| 42 | 42 | }) |
| 43 | 43 | ->isInstanceOf(\InvalidArgumentException::class) |