Passed
Push — master ( cafdd0...f4a7a1 )
by Alexey
03:53
created
src/Routing/src/Route.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     /**
79 79
      * Route constructor.
80 80
      *
81
-     * @param array $methods
81
+     * @param string[] $methods
82 82
      * @param string $path
83 83
      * @param string $responder
84 84
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -321,8 +321,7 @@
 block discarded – undo
321 321
     {
322 322
         $route = clone $this;
323 323
         $route->path = $prefix == '/' || $prefix == '' ?
324
-            $route->path :
325
-            sprintf('/%s/%s', trim($prefix, '/'), ltrim($route->path, '/'));
324
+            $route->path : sprintf('/%s/%s', trim($prefix, '/'), ltrim($route->path, '/'));
326 325
 
327 326
         return $route;
328 327
     }
Please login to merge, or discard this patch.
src/Adr/spec/InputSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function getMatchers()
20 20
     {
21 21
         return [
22
-            'containKeys' => function ($subject, ...$keys) {
22
+            'containKeys' => function($subject, ...$keys) {
23 23
                 foreach ($keys as $key) {
24 24
                     if (!array_key_exists($key, $subject[0])) {
25 25
                         return false;
Please login to merge, or discard this patch.
src/Adr/spec/PayloadSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function getMatchers()
15 15
     {
16 16
         return [
17
-            'beEmpty' => function ($subject) {
17
+            'beEmpty' => function($subject) {
18 18
                 return empty($subject);
19 19
             },
20 20
         ];
Please login to merge, or discard this patch.
src/Routing/spec/MiddlewarePipelineSpec.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,15 +48,15 @@
 block discarded – undo
48 48
         ResponseInterface $response,
49 49
         ResponseInterface $lastResponse
50 50
     ) {
51
-        $m1->process($request, Argument::type(Delegate::class))->will(function ($args) use ($lastResponse, $response) {
51
+        $m1->process($request, Argument::type(Delegate::class))->will(function($args) use ($lastResponse, $response) {
52 52
             $args[1]->next($args[0]);
53 53
 
54 54
             return $lastResponse;
55 55
         })->shouldBeCalled();
56
-        $m2->process($request, Argument::type(Delegate::class))->will(function ($args) {
56
+        $m2->process($request, Argument::type(Delegate::class))->will(function($args) {
57 57
             return $args[1]->next($args[0]);
58 58
         })->shouldBeCalled();
59
-        $m3->process($request, Argument::type(Delegate::class))->will(function ($args) {
59
+        $m3->process($request, Argument::type(Delegate::class))->will(function($args) {
60 60
             return $args[1]->next($args[0]);
61 61
         })->shouldBeCalled();
62 62
         $delegate->next($request)->willReturn($response)->shouldBeCalled();
Please login to merge, or discard this patch.
src/Routing/spec/RouteGroupSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     function it_collects_route_by_callback()
16 16
     {
17 17
         $route = new Route(['GET'], '/url', 'handler');
18
-        $group = $this->collect(function (\Venta\Contracts\Routing\RouteGroup $group) use ($route) {
18
+        $group = $this->collect(function(\Venta\Contracts\Routing\RouteGroup $group) use ($route) {
19 19
             $group->addRoute($route);
20 20
         })->shouldBeAnInstanceOf(\Venta\Contracts\Routing\RouteGroup::class);
21 21
         assert(in_array($route, $group->getRoutes()));
Please login to merge, or discard this patch.
src/Event/tests/DispatcherTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
         $eventName = ltrim(get_class($event), '\\');
18 18
         $dispatcher = new \Venta\Event\EventDispatcher;
19 19
 
20
-        $dispatcher->addListener($eventName, function (\Venta\Contracts\Event\Event $event) {
20
+        $dispatcher->addListener($eventName, function(\Venta\Contracts\Event\Event $event) {
21 21
             $event->setData('foo', 'bar');
22 22
         });
23 23
 
24
-        $dispatcher->addListener($eventName, function (\Venta\Contracts\Event\Event $event) {
24
+        $dispatcher->addListener($eventName, function(\Venta\Contracts\Event\Event $event) {
25 25
             $event->setData('boo', 'far');
26 26
         });
27 27
 
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
         $eventName = ltrim(get_class($event), '\\');
42 42
         $dispatcher = new \Venta\Event\EventDispatcher;
43 43
 
44
-        $dispatcher->addListener($eventName, function (\Venta\Contracts\Event\Event $event) {
44
+        $dispatcher->addListener($eventName, function(\Venta\Contracts\Event\Event $event) {
45 45
             $event->setData('foo', 'bar');
46 46
         });
47 47
 
48
-        $dispatcher->addListener($eventName, function (\Venta\Contracts\Event\Event $event) {
48
+        $dispatcher->addListener($eventName, function(\Venta\Contracts\Event\Event $event) {
49 49
             $event->stopPropagation();
50 50
         });
51 51
 
52
-        $dispatcher->addListener($eventName, function (\Venta\Contracts\Event\Event $event) {
52
+        $dispatcher->addListener($eventName, function(\Venta\Contracts\Event\Event $event) {
53 53
             $event->setData('boo', 'far');
54 54
         });
55 55
 
Please login to merge, or discard this patch.
src/Cache/tests/CacheTest.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
28 28
 
29 29
         $pool->shouldReceive('getItem')->with('key')->andReturn(
30 30
             Mockery::mock(\Psr\Cache\CacheItemInterface::class)
31
-                   ->shouldReceive('get')
32
-                   ->withNoArgs()
33
-                   ->andReturn('value')
34
-                   ->getMock()
31
+                    ->shouldReceive('get')
32
+                    ->withNoArgs()
33
+                    ->andReturn('value')
34
+                    ->getMock()
35 35
         );
36 36
         $this->assertSame('value', $cache->get('key'));
37 37
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $pool = Mockery::mock(\Psr\Cache\CacheItemPoolInterface::class);
50 50
         $cache = new \Venta\Cache\Cache($pool);
51 51
 
52
-        $pool->shouldReceive('save')->with(Mockery::on(function (\Cache\Adapter\Common\CacheItem $cacheItem) {
52
+        $pool->shouldReceive('save')->with(Mockery::on(function(\Cache\Adapter\Common\CacheItem $cacheItem) {
53 53
             $this->assertSame('key', $cacheItem->getKey());
54 54
             $this->assertEquals('2030-01-01 00:00:00', $cacheItem->getExpirationDate()->format('Y-m-d H:i:s'));
55 55
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $pool = Mockery::mock(\Psr\Cache\CacheItemPoolInterface::class);
68 68
         $cache = new \Venta\Cache\Cache($pool);
69 69
 
70
-        $pool->shouldReceive('save')->with(Mockery::on(function (\Cache\Adapter\Common\CacheItem $cacheItem) {
70
+        $pool->shouldReceive('save')->with(Mockery::on(function(\Cache\Adapter\Common\CacheItem $cacheItem) {
71 71
             $this->assertSame('key', $cacheItem->getKey());
72 72
             $this->assertEquals(time() + 10, $cacheItem->getExpirationDate()->getTimestamp());
73 73
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         $interval = new DateInterval('P1M');
89 89
 
90
-        $pool->shouldReceive('save')->with(Mockery::on(function (\Cache\Adapter\Common\CacheItem $cacheItem) use (
90
+        $pool->shouldReceive('save')->with(Mockery::on(function(\Cache\Adapter\Common\CacheItem $cacheItem) use (
91 91
             $interval
92 92
         ) {
93 93
             $this->assertSame('key', $cacheItem->getKey());
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $pool = Mockery::mock(\Psr\Cache\CacheItemPoolInterface::class);
111 111
         $cache = new \Venta\Cache\Cache($pool);
112 112
 
113
-        $pool->shouldReceive('save')->with(Mockery::on(function (\Cache\Adapter\Common\CacheItem $cacheItem) {
113
+        $pool->shouldReceive('save')->with(Mockery::on(function(\Cache\Adapter\Common\CacheItem $cacheItem) {
114 114
             $this->assertSame('key', $cacheItem->getKey());
115 115
             $this->assertNull($cacheItem->getExpirationDate());
116 116
 
Please login to merge, or discard this patch.
src/Config/spec/ConfigSpec.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
     public function getMatchers()
18 18
     {
19 19
         return [
20
-            'matchJson' => function ($subject, $json) {
20
+            'matchJson' => function($subject, $json) {
21 21
                 return json_encode($subject) == $json;
22 22
             },
23
-            'havePropertyWithValue' => function ($subject, $key, $value) {
23
+            'havePropertyWithValue' => function($subject, $key, $value) {
24 24
                 return $subject->{$key} === $value;
25 25
             },
26
-            'haveProperty' => function ($subject, $key) {
26
+            'haveProperty' => function($subject, $key) {
27 27
                 return property_exists($subject, $key);
28 28
             },
29 29
         ];
Please login to merge, or discard this patch.
src/Config/tests/ConfigTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
         $this->assertSame('value', $result->get('key'));
219 219
         $this->assertSame('zxcv', $result->get('map')->get('name'));
220 220
         $this->assertSame('poiuyt', $result->get('map')->get('other'));
221
-        $this->assertSame(['value 1', 'value 2', 'value 3', 'value 4', 'value 5',], $result->get('vector')->toArray());
221
+        $this->assertSame(['value 1', 'value 2', 'value 3', 'value 4', 'value 5', ], $result->get('vector')->toArray());
222 222
         $this->assertSame('is overwritten', $result->get('this'));
223 223
         $this->assertSame('plain string', $result->get('another'));
224 224
     }
Please login to merge, or discard this patch.