Test Setup Failed
Branch master (da8008)
by Chakir
10:17
created
src/Response/ResponseParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             throw new ResponseParserException("Failed to match " . self::MATCHES['message'] . " pattern.");
79 79
         }
80 80
 
81
-        return str_replace("\r",'',$matches[0]);  // remove the carriage return from the end
81
+        return str_replace("\r", '', $matches[0]); // remove the carriage return from the end
82 82
     }
83 83
 
84 84
     /**
Please login to merge, or discard this patch.
src/Stream/Stream.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
      */
48 48
     final public function write($command)
49 49
     {
50
-        if (($write = fwrite($this->stream, trim($command).self::CRLF)) !== false && $this->logger) {
51
-            $this->logger->command($command.self::CRLF);
50
+        if (($write = fwrite($this->stream, trim($command) . self::CRLF)) !== false && $this->logger) {
51
+            $this->logger->command($command . self::CRLF);
52 52
         }
53 53
 
54 54
         return $write;
Please login to merge, or discard this patch.
src/Stream/CommandStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
      */
83 83
     public function open()
84 84
     {
85
-        if($open = $this->openStreamSocket($this->host, $this->port, $this->timeout, $this->blocking)) {
85
+        if ($open = $this->openStreamSocket($this->host, $this->port, $this->timeout, $this->blocking)) {
86 86
             // TODO check the reply
87 87
             $this->read();
88 88
         }
Please login to merge, or discard this patch.
src/Stream/ActiveDataStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         // 3- listen to the socket on the local port that will
59 59
         // be send along with PORT comamnd.
60 60
         // 4- send the PORT command.
61
-        if (is_resource($stream = stream_socket_server('tcp://0.0.0.0:'.$port, $errnon, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN))) {
61
+        if (is_resource($stream = stream_socket_server('tcp://0.0.0.0:' . $port, $errnon, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN))) {
62 62
             $this->commandStream->write("PORT $ip,$low,$high");
63 63
             $response = new Response($this->commandStream->read());
64 64
             if ($response->getCode() === 200) {
Please login to merge, or discard this patch.
src/Stream/DataStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,6 @@
 block discarded – undo
35 35
     public function __construct($logger, $commandStream)
36 36
     {
37 37
         parent::__construct($logger);
38
-        $this->commandStream   = $commandStream;
38
+        $this->commandStream = $commandStream;
39 39
     }
40 40
 }
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
src/Logger/FileLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             $output .= ']';
101 101
 
102 102
             if ($this->write($output) === false) {
103
-                throw new FileLoggerException("Cannot write to file " . $this->filePath.".");
103
+                throw new FileLoggerException("Cannot write to file " . $this->filePath . ".");
104 104
             }
105 105
         }
106 106
     }
Please login to merge, or discard this patch.
src/Logger/ArrayLogger.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,9 @@
 block discarded – undo
51 51
             $lines = explode(self::CRLF, $message);
52 52
             $this->logs[] = sprintf("%s %s", $level, $lines[0]);
53 53
             foreach ($lines as $key => $line) {
54
-                if ($key === 0 || $line === '') continue;
54
+                if ($key === 0 || $line === '') {
55
+                    continue;
56
+                }
55 57
                 $this->logs[] = $line;
56 58
             }
57 59
         }
Please login to merge, or discard this patch.
src/Logger/LoggerInterface.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@
 block discarded – undo
68 68
      */
69 69
     public function error($message);
70 70
 
71
-     /**
72
-     * @param string $string
73
-     *
74
-     * @return void
75
-     */
71
+        /**
72
+         * @param string $string
73
+         *
74
+         * @return void
75
+         */
76 76
     public function command($string);
77 77
 
78 78
     /**
Please login to merge, or discard this patch.