@@ -178,7 +178,7 @@ |
||
| 178 | 178 | ]; |
| 179 | 179 | |
| 180 | 180 | if (!is_array($key)) { |
| 181 | - $key = [ $key => $value ]; |
|
| 181 | + $key = [$key => $value]; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | $key = array_intersect_key($key, $writableKeys); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | /** |
| 72 | 72 | * Return Data |
| 73 | 73 | * |
| 74 | - * @return string|array|\Traversable |
|
| 74 | + * @return string|null |
|
| 75 | 75 | */ |
| 76 | 76 | public function getData() |
| 77 | 77 | { |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | /** |
| 82 | 82 | * Sets Data |
| 83 | 83 | * |
| 84 | - * @param string|array|\Traversable $data Data to send |
|
| 84 | + * @param \AsyncSockets\RequestExecutor\Pipeline\PushbackIterator $data Data to send |
|
| 85 | 85 | * |
| 86 | 86 | * @return void |
| 87 | 87 | */ |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function __construct($data = null, $isOutOfBand = false) |
| 38 | 38 | { |
| 39 | - $this->data = $data !== null ? $data : null; |
|
| 39 | + $this->data = $data !== null ? $data : null; |
|
| 40 | 40 | $this->isOutOfBand = $isOutOfBand; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -172,8 +172,7 @@ |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | $result .= $this->hasUnreadItem() ? |
| 175 | - array_pop($this->unreadItems) : |
|
| 176 | - (string) $this->nestedIterator->current(); |
|
| 175 | + array_pop($this->unreadItems) : (string) $this->nestedIterator->current(); |
|
| 177 | 176 | |
| 178 | 177 | while ($this->hasUnreadItem() && strlen($result) < $this->chunkSize) { |
| 179 | 178 | $result .= array_pop($this->unreadItems); |