Completed
Pull Request — master (#3)
by Marco
06:15
created
src/Comodojo/Dispatcher/Response/Headers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     public function send($replace = false) {
27 27
 
28
-        foreach ($this->getAsString() as $header) {
28
+        foreach ( $this->getAsString() as $header ) {
29 29
 
30 30
             header($header, $replace);
31 31
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Traits/HeadersTrait.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function get($header = null) {
41 41
 
42
-        if (is_null($header)) {
42
+        if ( is_null($header) ) {
43 43
             return $this->headers;
44 44
         }
45 45
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function getAsString($header = null) {
63 63
 
64
-        if (is_null($header)) {
64
+        if ( is_null($header) ) {
65 65
 
66 66
             return array_map([$this, 'headerToString'],
67 67
                 array_keys($this->headers),
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function set($header, $value = null) {
105 105
 
106
-        if (is_null($value)) {
106
+        if ( is_null($value) ) {
107 107
 
108 108
             $header = explode(":", $header, 2);
109 109
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function delete($header = null) {
133 133
 
134
-        if (is_null($header)) {
134
+        if ( is_null($header) ) {
135 135
 
136 136
             $this->headers = [];
137 137
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function merge($headers) {
160 160
 
161
-        foreach ($headers as $key => $value) {
161
+        foreach ( $headers as $key => $value ) {
162 162
             $this->set($key, $value);
163 163
         }
164 164
 
@@ -183,8 +183,7 @@  discard block
 block discarded – undo
183 183
     private static function headerToString($header, $value) {
184 184
 
185 185
         return is_array($value) ?
186
-            (string)("$header: ".implode(',',$value)) :
187
-            (string)("$header: $value");
186
+            (string)("$header: ".implode(',', $value)) : (string)("$header: $value");
188 187
 
189 188
     }
190 189
 
Please login to merge, or discard this patch.