@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * RemoveUserMessage constructor. |
32 | 32 | * |
33 | - * @param $email |
|
33 | + * @param string $email |
|
34 | 34 | */ |
35 | 35 | public function __construct($email) |
36 | 36 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * @param LoginUserMessage $event |
27 | 27 | * |
28 | - * @return bool |
|
28 | + * @return boolean|null |
|
29 | 29 | */ |
30 | 30 | public function loginUserValidator(LoginUserMessage $event) |
31 | 31 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | ) |
52 | 52 | ->and($middleware = new ValidatorMiddleware($resolver)) |
53 | 53 | ->and($command = new LoginUserMessage('[email protected]', 'plainpassword')) |
54 | - ->and($callable = function (LoginUserMessage $command) { |
|
54 | + ->and($callable = function(LoginUserMessage $command) { |
|
55 | 55 | $command->setEmail('[email protected]'); |
56 | 56 | }) |
57 | 57 | ->when($middleware->handle($command, $callable)) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ->and() |
62 | 62 | ->when($command = new LoginUserMessage('[email protected]', 'plainpassword')) |
63 | 63 | ->then() |
64 | - ->exception(function () use ($middleware, $command, $callable) { |
|
64 | + ->exception(function() use ($middleware, $command, $callable) { |
|
65 | 65 | $middleware->handle($command, $callable); |
66 | 66 | })->isInstanceOf(ValidationException::class) |
67 | 67 | ; |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | ) |
81 | 81 | ->and($middleware = new ValidatorMiddleware($resolver)) |
82 | 82 | ->and($command = new LoginUserMessage('invalid.email.com', 'plainpassword')) |
83 | - ->and($callable = function () { |
|
83 | + ->and($callable = function() { |
|
84 | 84 | }) |
85 | 85 | ->then() |
86 | - ->exception(function () use ($middleware, $command, $callable) { |
|
86 | + ->exception(function() use ($middleware, $command, $callable) { |
|
87 | 87 | $middleware->handle($command, $callable); |
88 | 88 | })->isInstanceOf(ValidationException::class) |
89 | 89 | ; |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | ) |
103 | 103 | ->and($middleware = new ValidatorMiddleware($resolver)) |
104 | 104 | ->and($command = new LogoutUserMessage('invalid.email.com')) |
105 | - ->and($callable = function (LogoutUserMessage $command) { |
|
105 | + ->and($callable = function(LogoutUserMessage $command) { |
|
106 | 106 | $command->setEmail('[email protected]'); |
107 | 107 | }) |
108 | 108 | ->then() |
109 | - ->exception(function () use ($middleware, $command, $callable) { |
|
109 | + ->exception(function() use ($middleware, $command, $callable) { |
|
110 | 110 | $middleware->handle($command, $callable); |
111 | 111 | })->isInstanceOf(ValidationException::class) |
112 | 112 | ; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | ) |
126 | 126 | ->and($middleware = new ValidatorMiddleware($resolver)) |
127 | 127 | ->and($command = new RemoveUserMessage('[email protected]')) |
128 | - ->and($callable = function (RemoveUserMessage $command) { |
|
128 | + ->and($callable = function(RemoveUserMessage $command) { |
|
129 | 129 | $command->setEmail('[email protected]'); |
130 | 130 | }) |
131 | 131 | ->when($middleware->handle($command, $callable)) |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | ) |
149 | 149 | ->and($middleware = new ValidatorMiddleware($resolver)) |
150 | 150 | ->and($command = new RemoveUserMessage('[email protected]')) |
151 | - ->and($callable = function (RemoveUserMessage $command) { |
|
151 | + ->and($callable = function(RemoveUserMessage $command) { |
|
152 | 152 | $command->setEmail('[email protected]'); |
153 | 153 | }) |
154 | 154 | ->then() |
155 | - ->exception(function () use ($middleware, $command, $callable) { |
|
155 | + ->exception(function() use ($middleware, $command, $callable) { |
|
156 | 156 | $middleware->handle($command, $callable); |
157 | 157 | })->isInstanceOf(NotFoundException::class) |
158 | 158 | ; |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $this |
56 | 56 | ->given($resolver = new MethodWithShortObjectNameAndSuffixResolver('Listener', 'Resolver')) |
57 | 57 | ->then() |
58 | - ->exception(function () use ($resolver) { |
|
58 | + ->exception(function() use ($resolver) { |
|
59 | 59 | $resolver->resolve(LoginUserMessage::class); |
60 | 60 | })->isInstanceOf(\Exception::class) |
61 | 61 | ; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $this |
49 | 49 | ->given($resolver = new ChainResolver([])) |
50 | 50 | ->then() |
51 | - ->exception(function () use ($resolver) { |
|
51 | + ->exception(function() use ($resolver) { |
|
52 | 52 | $resolver->resolve(new LogoutUserMessage('[email protected]')); |
53 | 53 | }) |
54 | 54 | ->isInstanceOf(NotFoundException::class) |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | ->given($locator = $this->createLocator()) |
52 | 52 | ->and($handler = new LoginUserMessageListener()) |
53 | 53 | ->then() |
54 | - ->exception(function () use ($locator, $handler) { |
|
54 | + ->exception(function() use ($locator, $handler) { |
|
55 | 55 | $locator->addHandler(255, $handler); |
56 | 56 | }) |
57 | 57 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this |
67 | 67 | ->given($locator = $this->createLocator()) |
68 | 68 | ->then() |
69 | - ->exception(function () use ($locator) { |
|
69 | + ->exception(function() use ($locator) { |
|
70 | 70 | $locator->locate(LoginUserMessage::class); |
71 | 71 | }) |
72 | 72 | ->isInstanceOf(NotFoundException::class) |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | ->object($locator->locate(LoginUserMessage::class)) |
81 | 81 | ->isEqualTo($handler) |
82 | 82 | ->and() |
83 | - ->exception(function () use ($locator) { |
|
83 | + ->exception(function() use ($locator) { |
|
84 | 84 | $locator->locate('Foo'); |
85 | 85 | }) |
86 | 86 | ->isInstanceOf(NotFoundException::class) |
@@ -44,7 +44,7 @@ |
||
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([LoginUserMessage::class => 255]); |
49 | 49 | }) |
50 | 50 | ->isInstanceOf(\InvalidArgumentException::class) |