Completed
Push — master ( 9edfc5...0d667f )
by Evgenij
03:15
created
src/RequestExecutor/Pipeline/DisconnectStage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
         $descriptor->setMetadata(RequestExecutorInterface::META_REQUEST_COMPLETE, true);
98 98
         try {
99 99
             $socket->close();
100
-            if ($meta[ RequestExecutorInterface::META_CONNECTION_FINISH_TIME ] !== null) {
100
+            if ($meta[RequestExecutorInterface::META_CONNECTION_FINISH_TIME] !== null) {
101 101
                 $this->callSocketSubscribers(
102 102
                     $descriptor,
103 103
                     $this->createEvent($descriptor, EventType::DISCONNECTED)
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/AbstractTimeAwareStage.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
74 72
         $meta  = $requestDescriptor->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,
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/WriteIoHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                 $operation,
51 51
                 $executor,
52 52
                 $socket,
53
-                $meta[ RequestExecutorInterface::META_USER_CONTEXT ]
53
+                $meta[RequestExecutorInterface::META_USER_CONTEXT]
54 54
             );
55 55
             $eventHandler->invokeEvent($event, $executor, $descriptor->getSocket(), $executionContext);
56 56
             $nextOperation = $event->getNextOperation();
Please login to merge, or discard this patch.
src/RequestExecutor/LibEventRequestExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         parent::initializeRequest($eventCaller, $executionContext);
107 107
         $this->base = new LeBase();
108 108
 
109
-        $this->connectStage    = $this->stageFactory->createConnectStage(
109
+        $this->connectStage = $this->stageFactory->createConnectStage(
110 110
             $this,
111 111
             $executionContext,
112 112
             $eventCaller,
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             case LeCallbackInterface::EVENT_READ:
187 187
                 // fall down
188 188
             case LeCallbackInterface::EVENT_WRITE:
189
-                $result       = $this->ioStage->processStage([ $requestDescriptor ]);
189
+                $result       = $this->ioStage->processStage([$requestDescriptor]);
190 190
                 $doResetEvent = empty($result);
191 191
 
192 192
                 break;
Please login to merge, or discard this patch.
src/Socket/Io/AbstractIo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $lastError = error_get_last();
49 49
         if (!empty($lastError)) {
50 50
             $phpMessage = explode(':', $lastError['message'], 2);
51
-            $phpMessage = trim(trim(end($phpMessage)), '.') . '.';
51
+            $phpMessage = trim(trim(end($phpMessage)), '.').'.';
52 52
             return $phpMessage;
53 53
         }
54 54
 
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/ConnectStage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             } elseif ($decision === LimitationSolverInterface::DECISION_SKIP_CURRENT) {
60 60
                 continue;
61 61
             } elseif ($decision !== LimitationSolverInterface::DECISION_OK) {
62
-                throw new \LogicException('Unknown decision ' . $decision . ' received.');
62
+                throw new \LogicException('Unknown decision '.$decision.' received.');
63 63
             }
64 64
 
65 65
             if ($this->connectSocket($descriptor)) {
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
             if (!$socket->isConnected()) {
126 126
                 $meta = $descriptor->getMetadata();
127 127
                 $socket->open(
128
-                    $meta[ RequestExecutorInterface::META_ADDRESS ],
129
-                    $meta[ RequestExecutorInterface::META_SOCKET_STREAM_CONTEXT]
128
+                    $meta[RequestExecutorInterface::META_ADDRESS],
129
+                    $meta[RequestExecutorInterface::META_SOCKET_STREAM_CONTEXT]
130 130
                 );
131 131
             } else {
132 132
                 $this->setSocketOperationTime($descriptor, RequestExecutorInterface::META_CONNECTION_FINISH_TIME);
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/ConnectStageReturningAllActiveSockets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     private function isDescriptorActive(RequestDescriptor $descriptor)
54 54
     {
55 55
         $meta = $descriptor->getMetadata();
56
-        return !$meta[ RequestExecutorInterface::META_REQUEST_COMPLETE ] &&
56
+        return !$meta[RequestExecutorInterface::META_REQUEST_COMPLETE] &&
57 57
                     $descriptor->isRunning() &&
58 58
                     !$descriptor->isForgotten();
59 59
     }
Please login to merge, or discard this patch.
src/Socket/ServerSocket.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,9 +85,8 @@
 block discarded – undo
85 85
             'udg' => 1,
86 86
         ];
87 87
 
88
-        return isset($connectionLessMap[ $scheme ]) ?
89
-            STREAM_SERVER_BIND :
90
-            STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
88
+        return isset($connectionLessMap[$scheme]) ?
89
+            STREAM_SERVER_BIND : STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
91 90
     }
92 91
 
93 92
     /**
Please login to merge, or discard this patch.
src/Operation/ReadWriteOperation.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.