Completed
Push — master ( f8c7ce...9048a9 )
by Thibaud
7s
created
src/Bundle/EventListener/TransformResponseListener.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
      * @param $config
103 103
      * @param $data
104 104
      * @param $includes
105
-     * @param $request
105
+     * @param \Symfony\Component\HttpFoundation\Request $request
106 106
      * @return array
107 107
      */
108 108
     private function transformResult($config, $data, $includes, $request)
Please login to merge, or discard this 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/DependencyInjection/Compiler/TransformerCompilerPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function process(ContainerBuilder $container)
19 19
     {
20
-        if (! $container->hasDefinition('alchemy_rest.transformer_registry')) {
20
+        if (!$container->hasDefinition('alchemy_rest.transformer_registry')) {
21 21
             return;
22 22
         }
23 23
 
Please login to merge, or discard this patch.
src/Bundle/DependencyInjection/RestExtension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     protected function configureExceptionListener(array $config, ContainerBuilder $container)
47 47
     {
48
-        if (! $config['enabled']) {
48
+        if (!$config['enabled']) {
49 49
             $container->removeDefinition('alchemy_rest.exception_listener');
50 50
 
51 51
             return;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected function configureDateRequestListener(array $config, ContainerBuilder $container)
68 68
     {
69
-        if (! $config['dates']['enabled']) {
69
+        if (!$config['dates']['enabled']) {
70 70
             $container->removeDefinition('alchemy_rest.date_request_listener');
71 71
 
72 72
             return;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     protected function configureSortRequestListener(array $config, ContainerBuilder $container)
88 88
     {
89
-        if (! $config['sort']['enabled']) {
89
+        if (!$config['sort']['enabled']) {
90 90
             $container->removeDefinition('alchemy_rest.sort_request_listener');
91 91
 
92 92
             return;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     protected function configurePaginationRequestListener(array $config, ContainerBuilder $container)
108 108
     {
109
-        if (! $config['pagination']['enabled']) {
109
+        if (!$config['pagination']['enabled']) {
110 110
             $container->removeDefinition('alchemy_rest.paginate_request_listener');
111 111
 
112 112
             return;
Please login to merge, or discard this patch.
src/Bundle/EventListener/BadRequestListener.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
     {
16 16
         $result = $event->getControllerResult();
17 17
 
18
-        if (! $result instanceof BadRequestResult) {
18
+        if (!$result instanceof BadRequestResult) {
19 19
             return;
20 20
         }
21 21
 
Please login to merge, or discard this patch.
src/Bundle/EventListener/DateParamRequestListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         $request = $event->getRequest();
32 32
         $attributes = $request->attributes;
33 33
 
34
-        if (! $attributes->has('_dates')) {
34
+        if (!$attributes->has('_dates')) {
35 35
             return;
36 36
         }
37 37
 
Please login to merge, or discard this patch.
src/Bundle/EventListener/EncodeJsonResponseListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@
 block discarded – undo
13 13
 
14 14
     public function onKernelView(GetResponseForControllerResultEvent $event)
15 15
     {
16
-        if (! $event->getRequest()->attributes->get('_rest[encode_response]', false, true)) {
16
+        if (!$event->getRequest()->attributes->get('_rest[encode_response]', false, true)) {
17 17
             return;
18 18
         }
19 19
 
20 20
         $result = $event->getControllerResult();
21 21
 
22
-        if (! $result instanceof Response) {
22
+        if (!$result instanceof Response) {
23 23
             if (!is_array($result)) {
24 24
                 throw new \LogicException('Invalid controller result: array was expected.');
25 25
             }
Please login to merge, or discard this patch.
src/Bundle/EventListener/RequestAcceptedListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $result = $event->getControllerResult();
18 18
 
19
-        if (! $result instanceof RequestAcceptedResult) {
19
+        if (!$result instanceof RequestAcceptedResult) {
20 20
             return;
21 21
         }
22 22
 
Please login to merge, or discard this patch.
src/Bundle/EventListener/RequestMatchingExceptionListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function onKernelException(GetResponseForExceptionEvent $event)
37 37
     {
38
-        if (! $this->matcher->matches($event->getRequest())) {
38
+        if (!$this->matcher->matches($event->getRequest())) {
39 39
             return;
40 40
         }
41 41
 
Please login to merge, or discard this patch.
src/Bundle/EventListener/ResourceCreatedListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $result = $event->getControllerResult();
25 25
         $request = $event->getRequest();
26 26
 
27
-        if (! $result instanceof ResourceCreatedResult) {
27
+        if (!$result instanceof ResourceCreatedResult) {
28 28
             return;
29 29
         }
30 30
 
Please login to merge, or discard this patch.