Passed
Push — master ( 384709...16ae1e )
by Michael
09:23
created
src/Response/Behaviour/IncludedObjectsAwareInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response\Behaviour;
5 5
 
Please login to merge, or discard this patch.
src/Response/Behaviour/HttpAttributesAwareInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response\Behaviour;
5 5
 
Please login to merge, or discard this patch.
src/Response/Behaviour/IncludedObjectsContainer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response\Behaviour;
5 5
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @var array
17 17
      */
18
-    protected $includedObjects = [];
18
+    protected $includedObjects = [ ];
19 19
 
20 20
     /**
21 21
      * Add included object to document
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function addIncludedObject($object)
26 26
     {
27
-        $this->includedObjects[] = $object;
27
+        $this->includedObjects[ ] = $object;
28 28
     }
29 29
 
30 30
     /**
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         foreach ($iterator as $object)
38 38
         {
39
-            $this->includedObjects[] = $object;
39
+            $this->includedObjects[ ] = $object;
40 40
         }
41 41
     }
42 42
 
Please login to merge, or discard this patch.
src/Response/Behaviour/HttpAttributesContainer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response\Behaviour;
5 5
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @var array
19 19
      */
20
-    protected $headers = [];
20
+    protected $headers = [ ];
21 21
 
22 22
     /**
23 23
      * Set status code
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function setHeader(string $name, string $value)
51 51
     {
52
-        $this->headers[$name] = $value;
52
+        $this->headers[ $name ] = $value;
53 53
     }
54 54
 
55 55
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         foreach ($headers as $name => $value)
63 63
         {
64
-            $this->headers[$name] = $value;
64
+            $this->headers[ $name ] = $value;
65 65
         }
66 66
     }
67 67
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function hasHeader(string $name): bool
75 75
     {
76
-        return isset($this->headers[$name]);
76
+        return isset($this->headers[ $name ]);
77 77
     }
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
src/Response/AbstractJsonApiView.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response;
5 5
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @var Link[]
40 40
      */
41
-    protected $documentLinks = [];
41
+    protected $documentLinks = [ ];
42 42
 
43 43
     /**
44 44
      * Set a callback to call after a resource-object has created.
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
     {
110 110
         $name = $link->getName();
111 111
 
112
-        if (isset($this->documentLinks[$name])) {
112
+        if (isset($this->documentLinks[ $name ])) {
113 113
             throw new \LogicException(sprintf('Link "%s" already added to document.'));
114 114
         }
115 115
 
116
-        $this->documentLinks[$name] = $link;
116
+        $this->documentLinks[ $name ] = $link;
117 117
     }
118 118
 
119 119
     /**
Please login to merge, or discard this patch.
src/Response/JsonApiObjectView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response;
5 5
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param int   $status
26 26
      * @param array $headers
27 27
      */
28
-    public function __construct($object, int $status = 200, array $headers = [])
28
+    public function __construct($object, int $status = 200, array $headers = [ ])
29 29
     {
30 30
         $this->object     = $object;
31 31
         $this->statusCode = $status;
Please login to merge, or discard this patch.
src/Response/JsonApiDocumentView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response;
5 5
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @param int              $status
32 32
      * @param array            $headers
33 33
      */
34
-    public function __construct(AbstractDocument $document, int $status = 200, array $headers = [])
34
+    public function __construct(AbstractDocument $document, int $status = 200, array $headers = [ ])
35 35
     {
36 36
         $this->document   = $document;
37 37
         $this->statusCode = $status;
Please login to merge, or discard this patch.
src/Response/JsonApiIteratorView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Response;
5 5
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param int          $status
26 26
      * @param array        $headers
27 27
      */
28
-    public function __construct(\Traversable $iterator, int $status = 200, array $headers = [])
28
+    public function __construct(\Traversable $iterator, int $status = 200, array $headers = [ ])
29 29
     {
30 30
         $this->iterator   = $iterator;
31 31
         $this->statusCode = $status;
Please login to merge, or discard this patch.
src/Routing/RouteRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Bundle\JsonApiBundle\Routing;
5 5
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @param  array  $parameters Request parameters
60 60
      * @return string
61 61
      */
62
-    public function generate(string $name, array $parameters = []): string
62
+    public function generate(string $name, array $parameters = [ ]): string
63 63
     {
64 64
         return $this->getUrlGenerator()->generate($name, $parameters);
65 65
     }
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 
93 93
         foreach ($this->routes as $name => $definition)
94 94
         {
95
-            $route = new Route($definition['path']);
96
-            $route->setMethods($definition['methods']);
95
+            $route = new Route($definition[ 'path' ]);
96
+            $route->setMethods($definition[ 'methods' ]);
97 97
 
98 98
             $collection->add($name, $route);
99 99
         }
Please login to merge, or discard this patch.