@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -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 | { |
@@ -127,8 +127,7 @@ discard block |
||
| 127 | 127 | private function getMinTimeout($newValue, $oldValue) |
| 128 | 128 | { |
| 129 | 129 | return (($newValue > 0 && $newValue < $oldValue) || $oldValue === null) ? |
| 130 | - $newValue : |
|
| 131 | - $oldValue; |
|
| 130 | + $newValue : $oldValue; |
|
| 132 | 131 | } |
| 133 | 132 | |
| 134 | 133 | /** |
@@ -149,8 +148,7 @@ discard block |
||
| 149 | 148 | } |
| 150 | 149 | |
| 151 | 150 | $result = $lastOperationTime === null ? |
| 152 | - $desiredTimeout : |
|
| 153 | - $desiredTimeout - ($microTime - $lastOperationTime); |
|
| 151 | + $desiredTimeout : $desiredTimeout - ($microTime - $lastOperationTime); |
|
| 154 | 152 | |
| 155 | 153 | return $result >= 0 ? $result : 0; |
| 156 | 154 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -41,8 +41,7 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | $meta = $operation->getMetadata(); |
| 43 | 43 | return !$this->hasConnected($operation) ? |
| 44 | - $meta[ RequestExecutorInterface::META_CONNECTION_TIMEOUT ] : |
|
| 45 | - $meta[ RequestExecutorInterface::META_IO_TIMEOUT ]; |
|
| 44 | + $meta[RequestExecutorInterface::META_CONNECTION_TIMEOUT] : $meta[RequestExecutorInterface::META_IO_TIMEOUT]; |
|
| 46 | 45 | } |
| 47 | 46 | |
| 48 | 47 | /** |
@@ -56,8 +55,7 @@ discard block |
||
| 56 | 55 | { |
| 57 | 56 | $meta = $operation->getMetadata(); |
| 58 | 57 | return !$this->hasConnected($operation) ? |
| 59 | - $meta[ RequestExecutorInterface::META_CONNECTION_START_TIME ] : |
|
| 60 | - $meta[ RequestExecutorInterface::META_LAST_IO_START_TIME ]; |
|
| 58 | + $meta[RequestExecutorInterface::META_CONNECTION_START_TIME] : $meta[RequestExecutorInterface::META_LAST_IO_START_TIME]; |
|
| 61 | 59 | } |
| 62 | 60 | |
| 63 | 61 | /** |
@@ -74,7 +72,7 @@ discard block |
||
| 74 | 72 | $meta = $operationMetadata->getMetadata(); |
| 75 | 73 | $table = [ |
| 76 | 74 | RequestExecutorInterface::META_CONNECTION_START_TIME => |
| 77 | - $meta[ RequestExecutorInterface::META_CONNECTION_START_TIME ] === null, |
|
| 75 | + $meta[RequestExecutorInterface::META_CONNECTION_START_TIME] === null, |
|
| 78 | 76 | |
| 79 | 77 | RequestExecutorInterface::META_CONNECTION_FINISH_TIME => |
| 80 | 78 | $meta[RequestExecutorInterface::META_CONNECTION_FINISH_TIME] === null, |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Async sockets |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the MIT license that is bundled |
|
| 8 | - * with this source code in the file LICENSE. |
|
| 9 | - */ |
|
| 3 | + * Async sockets |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2015, Efimov Evgenij <[email protected]> |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the MIT license that is bundled |
|
| 8 | + * with this source code in the file LICENSE. |
|
| 9 | + */ |
|
| 10 | 10 | namespace AsyncSockets\Exception; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | protected function initializeRequest(EventCaller $eventCaller) |
| 105 | 105 | { |
| 106 | 106 | parent::initializeRequest($eventCaller); |
| 107 | - $this->base = new LeBase(); |
|
| 107 | + $this->base = new LeBase(); |
|
| 108 | 108 | |
| 109 | 109 | $this->connectStage = $this->stageFactory->createConnectStage($this, $eventCaller, $this->solver); |
| 110 | 110 | $this->ioStage = $this->stageFactory->createIoStage($this, $eventCaller); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | protected function terminateRequest() |
| 118 | 118 | { |
| 119 | 119 | parent::terminateRequest(); |
| 120 | - $this->base = null; |
|
| 120 | + $this->base = null; |
|
| 121 | 121 | |
| 122 | 122 | $this->connectStage = null; |
| 123 | 123 | $this->ioStage = null; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | case LeCallbackInterface::EVENT_READ: |
| 169 | 169 | // fall down |
| 170 | 170 | case LeCallbackInterface::EVENT_WRITE: |
| 171 | - $result = $this->ioStage->processStage([ $operationMetadata ]); |
|
| 171 | + $result = $this->ioStage->processStage([$operationMetadata]); |
|
| 172 | 172 | $doResetEvent = empty($result); |
| 173 | 173 | |
| 174 | 174 | break; |