@@ -25,7 +25,7 @@ |
||
| 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 | |
@@ -39,7 +39,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |