Passed
Push — master ( 5e8674...3117ac )
by Marco
02:18
created
src/Comodojo/Daemon/Socket/Connection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $err_code = socket_last_error($socket);
56 56
         $err_string = socket_strerror($err_code);
57 57
 
58
-        if ( $err_code === 11 || strtolower($err_string) == 'success') return true;
58
+        if ( $err_code === 11 || strtolower($err_string) == 'success' ) return true;
59 59
 
60 60
         return $err_string;
61 61
 
Please login to merge, or discard this patch.
src/Comodojo/Daemon/Socket/AbstractSocket.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,17 +74,17 @@
 block discarded – undo
74 74
 
75 75
         $this->handler = $handler;
76 76
 
77
-        list($domain, $resource) = preg_split( '@(:\/\/)@', $handler );
77
+        list($domain, $resource) = preg_split('@(:\/\/)@', $handler);
78 78
 
79 79
         $domain = strtolower($domain);
80 80
 
81 81
         if ( $domain == 'unix' ) {
82
-            $this->socket_domain =  AF_UNIX;
82
+            $this->socket_domain = AF_UNIX;
83 83
             $this->socket_resource = $resource;
84 84
         } else {
85 85
             $this->socket_domain = AF_INET;
86 86
             $this->socket_protocol = $domain == 'udp' ? SOL_UDP : SOL_TCP;
87
-            if (strpos($resource, ':') !== false) {
87
+            if ( strpos($resource, ':') !== false ) {
88 88
                 list($this->socket_resource, $this->socket_port) = explode(":", $resource);
89 89
             } else {
90 90
                 $this->socket_resource = $resource;
Please login to merge, or discard this patch.
src/Comodojo/Daemon/Utils/PosixSignals.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     public function on(...$signals) {
93 93
 
94
-        foreach ($signals as $signal) {
94
+        foreach ( $signals as $signal ) {
95 95
             if ( !isset($this[$signal]) ) throw new Exception("Signal $signal not supported");
96 96
         }
97 97
 
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 
114 114
         if ( empty($this->pointer) ) {
115 115
             $result = [];
116
-            foreach ($this as $signo => $signame) {
116
+            foreach ( $this as $signo => $signame ) {
117 117
                 $result[] = $re = pcntl_signal($signo, $callable);
118
-                if (!$re) echo "\n>>>Signal $signo (".$this->sigName($signo).") failed\n";
118
+                if ( !$re ) echo "\n>>>Signal $signo (".$this->sigName($signo).") failed\n";
119 119
             }
120 120
             return !in_array(false, $result);
121 121
         }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         if ( empty($this->pointer) ) {
132 132
             $result = [];
133
-            foreach ($this as $signo => $signame) {
133
+            foreach ( $this as $signo => $signame ) {
134 134
                 $result[] = pcntl_signal($signo, SIG_DFL);
135 135
             }
136 136
             return !in_array(false, $result);
Please login to merge, or discard this patch.