@@ -137,7 +137,7 @@ |
||
| 137 | 137 | * @param OperationMetadata $operation Operation object |
| 138 | 138 | * @param double $microTime Current time with microseconds |
| 139 | 139 | * |
| 140 | - * @return double|null |
|
| 140 | + * @return double |
|
| 141 | 141 | */ |
| 142 | 142 | private function getSingleSocketTimeout(OperationMetadata $operation, $microTime) |
| 143 | 143 | { |
@@ -114,10 +114,10 @@ |
||
| 114 | 114 | |
| 115 | 115 | return ($desiredTimeout !== RequestExecutorInterface::WAIT_FOREVER) && |
| 116 | 116 | ( |
| 117 | - ($hasConnected && $lastOperationTime !== null) || |
|
| 117 | + ($hasConnected && $lastOperationTime !== null) || |
|
| 118 | 118 | !$hasConnected |
| 119 | - ) && |
|
| 119 | + ) && |
|
| 120 | 120 | ($microTime - $lastOperationTime >= $desiredTimeout) |
| 121 | - ; |
|
| 121 | + ; |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -136,13 +136,13 @@ |
||
| 136 | 136 | private function isDisconnectRequired(SocketInterface $socket) |
| 137 | 137 | { |
| 138 | 138 | return ( |
| 139 | - ($socket instanceof PersistentClientSocket) && |
|
| 139 | + ($socket instanceof PersistentClientSocket) && |
|
| 140 | 140 | ( |
| 141 | - feof($socket->getStreamResource()) !== false || |
|
| 141 | + feof($socket->getStreamResource()) !== false || |
|
| 142 | 142 | !stream_socket_get_name($socket->getStreamResource(), true) |
| 143 | - ) |
|
| 144 | - ) || ( |
|
| 145 | - !($socket instanceof PersistentClientSocket) |
|
| 146 | - ); |
|
| 143 | + ) |
|
| 144 | + ) || ( |
|
| 145 | + !($socket instanceof PersistentClientSocket) |
|
| 146 | + ); |
|
| 147 | 147 | } |
| 148 | 148 | } |
@@ -123,9 +123,9 @@ |
||
| 123 | 123 | $operation = $descriptor->getOperation(); |
| 124 | 124 | return ($operation instanceof NullOperation) || |
| 125 | 125 | ( |
| 126 | - $operation instanceof ReadOperation && |
|
| 126 | + $operation instanceof ReadOperation && |
|
| 127 | 127 | $operation->getFramePicker() instanceof EmptyFramePicker |
| 128 | - ); |
|
| 128 | + ); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | * @param string $needle What to find |
| 122 | 122 | * @param int $offset Start offset in $haystack |
| 123 | 123 | * |
| 124 | - * @return bool|int |
|
| 124 | + * @return string |
|
| 125 | 125 | */ |
| 126 | 126 | protected function findMarker($haystack, $needle, $offset = 0) |
| 127 | 127 | { |
@@ -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 | */ |