Completed
Push — master ( 5f2b1d...55031c )
by Joel
08:47
created
src/Resources/fake_agent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 set_time_limit(0);
15 15
 
16 16
 $socket_type = isset($_SERVER['RIO_SOCKET_TYPE']) ? $_SERVER['RIO_SOCKET_TYPE'] : 'AF_INET';
17
-$socket_path = isset($_SERVER['RIO_SOCKET_PATH']) ? $_SERVER['RIO_SOCKET_PATH'] : sys_get_temp_dir().'/fake_agent.sock';
17
+$socket_path = isset($_SERVER['RIO_SOCKET_PATH']) ? $_SERVER['RIO_SOCKET_PATH'] : sys_get_temp_dir() . '/fake_agent.sock';
18 18
 $ip = isset($_SERVER['RIO_HOST']) ? $_SERVER['RIO_HOST'] : 'localhost';
19 19
 $port = isset($_SERVER['RIO_PORT']) ? $_SERVER['RIO_PORT'] : 3100;
20 20
 $timeout = 1000000; // seconds
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         continue;
54 54
     }
55 55
 
56
-    $readPart = function ($client) {
56
+    $readPart = function($client) {
57 57
         $buffer = '';
58 58
         while (true) {
59 59
             if (stream_get_meta_data($client)['eof']) {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         }
132 132
     }
133 133
 
134
-    $writed = fwrite($client, $res."\0", strlen($res) + 1);
134
+    $writed = fwrite($client, $res . "\0", strlen($res) + 1);
135 135
 
136 136
     var_dump($writed);
137 137
 }
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $connection = $this->getConnection();
85 85
 
86
-        $toSend = $command->getName()."\0".$command->getRequest()."\0";
86
+        $toSend = $command->getName() . "\0" . $command->getRequest() . "\0";
87 87
         $sent = $this->box('doSend', false, [$connection, $toSend]);
88 88
 
89 89
         if (false === $sent) {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
             // Timeout
227 227
             if (0 === $modified) {
228
-                throw new TimeoutException('Timeout reached when trying to read stream ('.$this->timeout.'ms)');
228
+                throw new TimeoutException('Timeout reached when trying to read stream (' . $this->timeout . 'ms)');
229 229
             }
230 230
 
231 231
             // Error
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
     private function box($method, $defaultReturnValue = null, array $args = [])
247 247
     {
248
-        set_error_handler(__CLASS__.'::handleInternalError');
248
+        set_error_handler(__CLASS__ . '::handleInternalError');
249 249
 
250 250
         try {
251 251
             $returnValue = \call_user_func_array([$this, $method], $args);
Please login to merge, or discard this patch.
src/Command/LogCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             'user_agent' => $this->request->getUserAgent(),
37 37
             'referer' => $this->request->getReferer(),
38 38
             'scheme' => $this->request->getScheme(),
39
-            'proxy' => 'php-sdk-redirectionio:'.Client::VERSION,
39
+            'proxy' => 'php-sdk-redirectionio:' . Client::VERSION,
40 40
             'use_json' => true,
41 41
         ];
42 42
 
Please login to merge, or discard this patch.