Completed
Push — master ( b90886...70bc0c )
by Thibaud
02:46
created
src/Bundle/EventListener/TransformResponseListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             throw new \RuntimeException('Transformer key is not set.');
58 58
         }
59 59
 
60
-        $config['list'] = (bool)(isset($config['list']) ? $config['list'] : false);
60
+        $config['list'] = (bool) (isset($config['list']) ? $config['list'] : false);
61 61
 
62 62
         return $config;
63 63
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $limit = $pagination->getLimit();
83 83
 
84
-        $routeGenerator = function ($page) use ($request, $limit) {
84
+        $routeGenerator = function($page) use ($request, $limit) {
85 85
             // Calculation is necessary since requested page is not
86 86
             $params = array_merge($request->query->all(), $request->attributes->get('_route_params', array()), array(
87 87
                 'limit' => $limit,
Please login to merge, or discard this patch.
src/Bundle/Rest/Request/PaginationRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,6 +55,6 @@
 block discarded – undo
55 55
      */
56 56
     public function getCurrentPage($defaultPageSize = 10)
57 57
     {
58
-        return (int)floor($this->getOffset(0) / max(1, $this->getLimit($defaultPageSize))) + 1;
58
+        return (int) floor($this->getOffset(0) / max(1, $this->getLimit($defaultPageSize))) + 1;
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
src/Component/Request/ContentTypeMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
         // This is in case the submitted header is not standards compliant
34 34
         if (strpos($acceptHeader, ';')) {
35
-            list($acceptHeader, ) = explode(';', $acceptHeader);
35
+            list($acceptHeader,) = explode(';', $acceptHeader);
36 36
         }
37 37
 
38 38
         $format = $this->negotiator->getBest($acceptHeader, $acceptedContentTypes);
Please login to merge, or discard this patch.
src/Component/Response/ArrayTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function getTransformer($key)
39 39
     {
40
-        if (! isset($this->transformers[$key])) {
40
+        if (!isset($this->transformers[$key])) {
41 41
             throw new \RuntimeException('Invalid transformer requested.');
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/Component/Response/TransformerRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function offsetSet($offset, $value)
32 32
     {
33
-        if (! $value instanceof TransformerAbstract) {
33
+        if (!$value instanceof TransformerAbstract) {
34 34
             throw new \InvalidArgumentException('Value must be an instance of League\Fractal\AbstractTransformer');
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/Provider/Middleware/SetDateAttributesMiddlewareFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
 {
9 9
     public function __invoke(array $dates = array())
10 10
     {
11
-        return function (Request $request) use ($dates) {
12
-            if (! empty($dates)) {
11
+        return function(Request $request) use ($dates) {
12
+            if (!empty($dates)) {
13 13
                 $request->attributes->set('_dates', $dates);
14 14
             }
15 15
         };
Please login to merge, or discard this patch.
src/Provider/Middleware/SetEncodingAttributeMiddlewareFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
     public function __invoke($decodeRequest = true, $encodeResponse = true)
11 11
     {
12
-        return function (Request $request) use ($decodeRequest, $encodeResponse) {
12
+        return function(Request $request) use ($decodeRequest, $encodeResponse) {
13 13
             $restAttribute = $request->attributes->get('_rest', array());
14 14
 
15 15
             $restAttribute['decode_request'] = (bool) $decodeRequest;
Please login to merge, or discard this patch.
src/Provider/Middleware/SetPaginationAndSortAttributesMiddlewareFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
     public function __invoke($parseSorts = true, $parsePagination = true)
11 11
     {
12
-        return function (Request $request) use ($parseSorts, $parsePagination) {
12
+        return function(Request $request) use ($parseSorts, $parsePagination) {
13 13
             $request->attributes->set('_paginate', (bool) $parsePagination);
14 14
             $request->attributes->set('_sort', (bool) $parseSorts);
15 15
         };
Please login to merge, or discard this patch.
src/Provider/Middleware/SetTransformAttributeMiddlewareFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __invoke($transformerKey, $isList)
10 10
     {
11
-        return function (Request $request) use ($transformerKey, $isList) {
11
+        return function(Request $request) use ($transformerKey, $isList) {
12 12
             $restAttribute = $request->attributes->get('_rest', array());
13 13
 
14 14
             $restAttribute['transform'] = $transformerKey;
Please login to merge, or discard this patch.