@@ -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 | { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | /** |
| 141 | 141 | * Return average speed for measurements |
| 142 | 142 | * |
| 143 | - * @return double|null |
|
| 143 | + * @return integer |
|
| 144 | 144 | */ |
| 145 | 145 | private function getAverageSpeed() |
| 146 | 146 | { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | /** |
| 153 | 153 | * Return current speed in bytes per seconds |
| 154 | 154 | * |
| 155 | - * @return float |
|
| 155 | + * @return integer |
|
| 156 | 156 | */ |
| 157 | 157 | public function getCurrentSpeed() |
| 158 | 158 | { |