Completed
Push — master ( 3a5ed6...84fa1e )
by Ivannis Suárez
03:26
created
Tests/Units/Middlewares/EventDispatcher/EventDispatcherMiddlewareTests.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             ->and($middleware = new EventDispatcherMiddleware($dispatcher))
35 35
             ->and($event = new LoginUserEvent('[email protected]'))
36 36
             ->and($dispatcher->addListener($event->name(), array(new LoginUserEventListener(), 'onLogin')))
37
-            ->and($dispatcher->addListener($event->name(), function (LoginUserEvent $event) {
37
+            ->and($dispatcher->addListener($event->name(), function(LoginUserEvent $event) {
38 38
                 $this
39 39
                     ->string($event->email())
40 40
                     ->isEqualTo('[email protected]')
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
                 $event->setEmail('[email protected]');
44 44
             }))
45
-            ->and($callable = function (LoginUserEvent $event) {
45
+            ->and($callable = function(LoginUserEvent $event) {
46 46
                 $event->setEmail('[email protected]');
47 47
             })
48 48
             ->when($result = $middleware->handle($event, $callable))
49 49
             ->then()
50 50
                 ->string($event->email())
51 51
                     ->isEqualTo('[email protected]')
52
-                ->exception(function () use ($middleware, $callable) {
52
+                ->exception(function() use ($middleware, $callable) {
53 53
                     $middleware->handle(new \StdClass(), $callable);
54 54
                 })->isInstanceOf(\InvalidArgumentException::class)
55 55
         ;
Please login to merge, or discard this patch.
Tests/Units/Query/QueryBusTests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             ->given($middleware = new LockingMiddleware())
36 36
             ->and($queryBus = new QueryBus([$middleware]))
37 37
             ->then()
38
-                ->exception(function () use ($queryBus) {
38
+                ->exception(function() use ($queryBus) {
39 39
                     $queryBus->dispatch(new PublishedPostsQuery(new \DateTime()));
40 40
                 })
41 41
                 ->isInstanceOf(NotFoundException::class)
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $this
81 81
             ->given($queryBus = QueryBus::create())
82 82
             ->then()
83
-                ->exception(function () use ($queryBus) {
83
+                ->exception(function() use ($queryBus) {
84 84
                     $queryBus->dispatch(new FooMessage());
85 85
                 })
86 86
                 ->isInstanceOf(\InvalidArgumentException::class)
Please login to merge, or discard this patch.
Tests/Units/Command/CommandBusTests.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
             ->given($middleware = new LockingMiddleware())
35 35
             ->and($commandBus = new CommandBus([$middleware]))
36 36
             ->then()
37
-                ->exception(function () use ($commandBus) {
37
+                ->exception(function() use ($commandBus) {
38 38
                     $commandBus->dispatch(new EncodePasswordCommand('plainpassword'));
39 39
                 })
40 40
                 ->isInstanceOf(NotFoundException::class)
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $this
66 66
             ->given($commandBus = CommandBus::create())
67 67
             ->then()
68
-                ->exception(function () use ($commandBus) {
68
+                ->exception(function() use ($commandBus) {
69 69
                     $commandBus->dispatch(new FooMessage());
70 70
                 })
71 71
                 ->isInstanceOf(\InvalidArgumentException::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.
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->name(), function (LoginUserEvent $event) {
54
+            ->and($eventBus->addListener($event->name(), 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->name();
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/Validator/ValidatorMiddlewareTests.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this
32 32
             ->given($middleware = new ValidatorMiddleware())
33 33
             ->and($command = new LoginUserCommand('[email protected]', 'plainpassword'))
34
-            ->and($callable = function (LoginUserCommand $command) {
34
+            ->and($callable = function(LoginUserCommand $command) {
35 35
                 $command->setEmail('[email protected]');
36 36
             })
37 37
             ->when($middleware->handle($command, $callable))
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
         $this
44 44
             ->given($middleware = new ValidatorMiddleware())
45 45
             ->and($command = new LoginUserCommand('invalid.email.com', 'plainpassword'))
46
-            ->and($callable = function () {
46
+            ->and($callable = function() {
47 47
             })
48 48
             ->then()
49
-                ->exception(function () use ($middleware, $command, $callable) {
49
+                ->exception(function() use ($middleware, $command, $callable) {
50 50
                     $middleware->handle($command, $callable);
51 51
                 })->isInstanceOf(ValidationException::class)
52 52
         ;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this
55 55
             ->given($middleware = new ValidatorMiddleware())
56 56
             ->and($command = new LogoutUserCommand('invalid.email.com'))
57
-            ->and($callable = function (LogoutUserCommand $command) {
57
+            ->and($callable = function(LogoutUserCommand $command) {
58 58
                 $command->setEmail('[email protected]');
59 59
             })
60 60
             ->when($middleware->handle($command, $callable))
Please login to merge, or discard this patch.
Tests/Units/Middlewares/Handler/Resolver/NameOfQuery/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.
Middlewares/Handler/Resolver/NameOfQuery/FromQueryNamedResolverTests.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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)
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.