Completed
Push — master ( c85972...e44201 )
by Ivannis Suárez
03:16
created
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/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.
Tests/Fixtures/Command/LogoutUserCommand.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     /**
28 28
      * LogoutUserCommand constructor.
29 29
      *
30
-     * @param $email
30
+     * @param string $email
31 31
      */
32 32
     public function __construct($email)
33 33
     {
Please login to merge, or discard this patch.
Tests/Fixtures/Command/LoginUserCommand.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Cubiche\Core\Bus\Command\CommandInterface;
13 13
 use Cubiche\Core\Validator\Assert;
14 14
 use Cubiche\Core\Validator\Mapping\ClassMetadata;
15
-use Cubiche\Core\Validator\Validator;
16 15
 
17 16
 /**
18 17
  * LoginUserCommand class.
Please login to merge, or discard this patch.