@@ -105,8 +105,7 @@ discard block |
||
105 | 105 | public function getReadOperation() |
106 | 106 | { |
107 | 107 | return !empty($this->queue[OperationInterface::OPERATION_READ]) ? |
108 | - reset($this->queue[OperationInterface::OPERATION_READ]) : |
|
109 | - null; |
|
108 | + reset($this->queue[OperationInterface::OPERATION_READ]) : null; |
|
110 | 109 | } |
111 | 110 | |
112 | 111 | /** |
@@ -117,8 +116,7 @@ discard block |
||
117 | 116 | public function getWriteOperation() |
118 | 117 | { |
119 | 118 | return !empty($this->queue[OperationInterface::OPERATION_WRITE]) ? |
120 | - reset($this->queue[OperationInterface::OPERATION_WRITE]) : |
|
121 | - null; |
|
119 | + reset($this->queue[OperationInterface::OPERATION_WRITE]) : null; |
|
122 | 120 | } |
123 | 121 | |
124 | 122 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | { |
85 | 85 | $operation = $requestDescriptor->getOperation(); |
86 | 86 | if (!$this->ioHandler->supports($operation)) { |
87 | - throw new \LogicException('There is no handler able to process ' . get_class($operation) . ' operation.'); |
|
87 | + throw new \LogicException('There is no handler able to process '.get_class($operation).' operation.'); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | return $this->ioHandler; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | private function setConnectionFinishTime(RequestDescriptor $requestDescriptor) |
160 | 160 | { |
161 | 161 | $meta = $requestDescriptor->getMetadata(); |
162 | - $wasConnected = $meta[ RequestExecutorInterface::META_CONNECTION_FINISH_TIME ] !== null; |
|
162 | + $wasConnected = $meta[RequestExecutorInterface::META_CONNECTION_FINISH_TIME] !== null; |
|
163 | 163 | $this->setSocketOperationTime($requestDescriptor, RequestExecutorInterface::META_CONNECTION_FINISH_TIME); |
164 | 164 | if (!$wasConnected) { |
165 | 165 | $event = $this->createEvent($requestDescriptor, EventType::CONNECTED); |
@@ -62,8 +62,7 @@ discard block |
||
62 | 62 | ) { |
63 | 63 | /** @var ReadWriteOperation $operation */ |
64 | 64 | $sequence = $operation->isReadFirst() ? |
65 | - [$operation->getReadOperation(), $operation->getWriteOperation()] : |
|
66 | - [$operation->getWriteOperation(), $operation->getReadOperation()]; |
|
65 | + [$operation->getReadOperation(), $operation->getWriteOperation()] : [$operation->getWriteOperation(), $operation->getReadOperation()]; |
|
67 | 66 | $sequence = array_filter($sequence); |
68 | 67 | |
69 | 68 | foreach ($sequence as $op) { |
@@ -78,8 +77,7 @@ discard block |
||
78 | 77 | } |
79 | 78 | |
80 | 79 | return $operation->getReadOperation() !== null || $operation->getWriteOperation() !== null ? |
81 | - $operation : |
|
82 | - null; |
|
80 | + $operation : null; |
|
83 | 81 | } |
84 | 82 | |
85 | 83 | /** |
@@ -59,8 +59,7 @@ |
||
59 | 59 | ) { |
60 | 60 | $handler = $this->getHandler($operation); |
61 | 61 | return $handler ? |
62 | - $handler->handle($operation, $descriptor, $executor, $eventHandler, $executionContext) : |
|
63 | - null; |
|
62 | + $handler->handle($operation, $descriptor, $executor, $eventHandler, $executionContext) : null; |
|
64 | 63 | } |
65 | 64 | |
66 | 65 | /** |