Completed
Branch 0.4-dev (d27253)
by Evgenij
03:26
created
src/Frame/MarkerFramePicker.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,6 @@
 block discarded – undo
126 126
     protected function findMarker($haystack, $needle, $offset = 0)
127 127
     {
128 128
         return $this->isCaseSensitive ?
129
-            strpos($haystack, $needle, $offset) :
130
-            stripos($haystack, $needle, $offset);
129
+            strpos($haystack, $needle, $offset) : stripos($haystack, $needle, $offset);
131 130
     }
132 131
 }
Please login to merge, or discard this patch.
src/Socket/Io/AbstractClientIo.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,8 +143,7 @@
 block discarded – undo
143 143
         $resource = $this->socket->getStreamResource();
144 144
         if (!is_resource($resource)) {
145 145
             $message = $this->state === self::STATE_CONNECTED ?
146
-                'Connection was unexpectedly closed.' :
147
-                'Can not start io operation on uninitialized socket.';
146
+                'Connection was unexpectedly closed.' : 'Can not start io operation on uninitialized socket.';
148 147
             throw new ConnectionException($this->socket, $message);
149 148
         }
150 149
 
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/AbstractStage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         return new Event(
105 105
             $this->executor,
106 106
             $operation->getSocket(),
107
-            $meta[ RequestExecutorInterface::META_USER_CONTEXT ],
107
+            $meta[RequestExecutorInterface::META_USER_CONTEXT],
108 108
             $eventName
109 109
         );
110 110
     }
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/SelectStage.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/GuardianStage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     private function isZombieCandidate(RequestDescriptor $descriptor)
117 117
     {
118
-        $metadata  = $descriptor->getMetadata();
118
+        $metadata = $descriptor->getMetadata();
119 119
         if ($metadata[RequestExecutorInterface::META_REQUEST_COMPLETE]) {
120 120
             return false;
121 121
         }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $event  = new DataAlertEvent(
165 165
             $this->executor,
166 166
             $socket,
167
-            $meta[ RequestExecutorInterface::META_USER_CONTEXT ],
167
+            $meta[RequestExecutorInterface::META_USER_CONTEXT],
168 168
             $attempt,
169 169
             $totalAttempts
170 170
         );
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/ExcludedOperationsStage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
         foreach ($requestDescriptors as $key => $descriptor) {
48 48
             if (in_array($descriptor, $currentOperations, true)) {
49
-                unset($requestDescriptors[ $key]);
49
+                unset($requestDescriptors[$key]);
50 50
             }
51 51
         }
52 52
 
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/IoStage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             }
87 87
         }
88 88
 
89
-        throw new \LogicException('There is no handler able to process ' . get_class($operation) . ' operation.');
89
+        throw new \LogicException('There is no handler able to process '.get_class($operation).' operation.');
90 90
     }
91 91
 
92 92
     /**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     private function setConnectionFinishTime(RequestDescriptor $requestDescriptor)
158 158
     {
159 159
         $meta         = $requestDescriptor->getMetadata();
160
-        $wasConnected = $meta[ RequestExecutorInterface::META_CONNECTION_FINISH_TIME ] !== null;
160
+        $wasConnected = $meta[RequestExecutorInterface::META_CONNECTION_FINISH_TIME] !== null;
161 161
         $this->setSocketOperationTime($requestDescriptor, RequestExecutorInterface::META_CONNECTION_FINISH_TIME);
162 162
         if (!$wasConnected) {
163 163
             $event = $this->createEvent($requestDescriptor, EventType::CONNECTED);
Please login to merge, or discard this patch.
src/Exception/UnmanagedSocketException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             $socket,
31 31
             sprintf(
32 32
                 'System has detected a zombie connection %s and closed it. '.
33
-                'If you see this message it means that application ' .
33
+                'If you see this message it means that application '.
34 34
                 'has lost control on one of its sockets.',
35 35
                 (string) $socket
36 36
             )
Please login to merge, or discard this patch.
src/Socket/AsyncSocketFactory.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -74,19 +74,17 @@
 block discarded – undo
74 74
     {
75 75
         switch ($type) {
76 76
             case self::SOCKET_CLIENT:
77
-                $isPersistent  = isset($options[ self::SOCKET_OPTION_IS_PERSISTENT ]) &&
78
-                                 $options[ self::SOCKET_OPTION_IS_PERSISTENT ];
79
-                $persistentKey = isset($options[ self::SOCKET_OPTION_PERSISTENT_KEY ]) ?
80
-                    $options[ self::SOCKET_OPTION_PERSISTENT_KEY ] :
81
-                    null;
77
+                $isPersistent  = isset($options[self::SOCKET_OPTION_IS_PERSISTENT]) &&
78
+                                 $options[self::SOCKET_OPTION_IS_PERSISTENT];
79
+                $persistentKey = isset($options[self::SOCKET_OPTION_PERSISTENT_KEY]) ?
80
+                    $options[self::SOCKET_OPTION_PERSISTENT_KEY] : null;
82 81
 
83 82
                 return $isPersistent ?
84
-                    new PersistentClientSocket($persistentKey) :
85
-                    new ClientSocket();
83
+                    new PersistentClientSocket($persistentKey) : new ClientSocket();
86 84
             case self::SOCKET_SERVER:
87 85
                 return new ServerSocket();
88 86
             default:
89
-                throw new \InvalidArgumentException("Unexpected type {$type} used in " . __FUNCTION__);
87
+                throw new \InvalidArgumentException("Unexpected type {$type} used in ".__FUNCTION__);
90 88
         }
91 89
     }
92 90
 
Please login to merge, or discard this patch.