@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $logger->deleteLogs(); |
146 | 146 | $logs = $logger->deleteProfileLogs(); |
147 | 147 | $pid = getmypid(); |
148 | - foreach(array_keys($logs) as $key) { // Reset PROFILE_BEGIN to pid. |
|
148 | + foreach (array_keys($logs) as $key) { // Reset PROFILE_BEGIN to pid. |
|
149 | 149 | $logs[$key][TLogger::LOG_LEVEL] &= ~TLogger::LOGGED; |
150 | 150 | $logs[$key][TLogger::LOG_PID] = $pid; |
151 | 151 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | if (!$this->_parentConnections) { |
177 | 177 | return; |
178 | 178 | } |
179 | - if($pid && !isset($this->_parentConnections[$pid])) { |
|
179 | + if ($pid && !isset($this->_parentConnections[$pid])) { |
|
180 | 180 | return; |
181 | 181 | } |
182 | 182 | |
@@ -187,11 +187,11 @@ discard block |
||
187 | 187 | do { |
188 | 188 | $read = $connections; |
189 | 189 | if (stream_select($read, $write, $except, ($wait || count($childLogs)) ? 1 : 0, 0)) { |
190 | - foreach($read as $pid => $socket) { |
|
190 | + foreach ($read as $pid => $socket) { |
|
191 | 191 | $data = fread($socket, 8192); |
192 | 192 | do { |
193 | 193 | $iterate = false; |
194 | - if($data !== false) { |
|
194 | + if ($data !== false) { |
|
195 | 195 | if (array_key_exists($pid, $childLogs)) { |
196 | 196 | $childLogs[$pid][0] .= $data; |
197 | 197 | } else { |
@@ -234,12 +234,12 @@ discard block |
||
234 | 234 | } while ($iterate); |
235 | 235 | } |
236 | 236 | } |
237 | - } while(count($childLogs) || $wait && ($pid && isset($connections[$pid]) || $pid === null && $connections)); |
|
237 | + } while (count($childLogs) || $wait && ($pid && isset($connections[$pid]) || $pid === null && $connections)); |
|
238 | 238 | |
239 | 239 | if (!$completeLogs) { |
240 | 240 | return; |
241 | 241 | } |
242 | - foreach(array_merge(...$completeLogs) as $pid => $logs) { |
|
242 | + foreach (array_merge(...$completeLogs) as $pid => $logs) { |
|
243 | 243 | Prado::getLogger()->mergeLogs(unserialize($logs)); |
244 | 244 | } |
245 | 245 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | return; |
258 | 258 | } |
259 | 259 | |
260 | - if(!($logger instanceof TLogger)) { |
|
260 | + if (!($logger instanceof TLogger)) { |
|
261 | 261 | $logger = Prado::getLogger(); |
262 | 262 | } |
263 | 263 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $data = substr($data, $count); |
295 | 295 | } |
296 | 296 | } |
297 | - } while($count !== false && strlen($data) > 0); |
|
297 | + } while ($count !== false && strlen($data) > 0); |
|
298 | 298 | |
299 | 299 | if ($final) { |
300 | 300 | stream_socket_shutdown($this->_childConnection, STREAM_SHUT_RDWR); |
@@ -113,7 +113,7 @@ |
||
113 | 113 | */ |
114 | 114 | public function getAddress(): string |
115 | 115 | { |
116 | - if(!$this->_address) { |
|
116 | + if (!$this->_address) { |
|
117 | 117 | if ($this->getIpv6()) { |
118 | 118 | if ($this->getAll()) { |
119 | 119 | return '[::0]'; |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | foreach ($classes as $class) { |
515 | 515 | if (isset(self::$_um[$class])) { |
516 | 516 | foreach (self::$_um[$class] as $name => $behavior) { |
517 | - if(is_numeric($name)) { |
|
517 | + if (is_numeric($name)) { |
|
518 | 518 | continue; |
519 | 519 | } |
520 | 520 | if (!array_key_exists($name, $classBehaviors)) { |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | } |
790 | 790 | |
791 | 791 | if (isset(self::$_um[$lclass = strtolower(static::class)])) { |
792 | - foreach(self::$_um[$lclass] as $pbehavior) { |
|
792 | + foreach (self::$_um[$lclass] as $pbehavior) { |
|
793 | 793 | $class = $behavior = $pbehavior->getBehavior(); |
794 | 794 | if (is_array($behavior)) { |
795 | 795 | $class = $behavior['class']; |
@@ -1454,7 +1454,7 @@ discard block |
||
1454 | 1454 | $name = strtolower($name); |
1455 | 1455 | $responses = []; |
1456 | 1456 | |
1457 | - if($param instanceof IEventParameter) { |
|
1457 | + if ($param instanceof IEventParameter) { |
|
1458 | 1458 | $param->setEventName($name); |
1459 | 1459 | } |
1460 | 1460 | |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | $behaviorObject->setName($name); |
1819 | 1819 | $isClassBehavior = $behaviorObject instanceof IClassBehavior; |
1820 | 1820 | unset(self::$_um[$class][$name]); |
1821 | - if(empty(self::$_um[$class])) { |
|
1821 | + if (empty(self::$_um[$class])) { |
|
1822 | 1822 | unset(self::$_um[$class]); |
1823 | 1823 | } |
1824 | 1824 | $results = $behaviorObject->raiseEvent('fxDetachClassBehavior', null, $param); |
@@ -1840,7 +1840,7 @@ discard block |
||
1840 | 1840 | return $this->_m[$behaviorname]; |
1841 | 1841 | } |
1842 | 1842 | if ((class_exists($behaviorname, false) || interface_exists($behaviorname, false)) && $this->_m) { |
1843 | - foreach($this->_m->toArray() as $behavior) { |
|
1843 | + foreach ($this->_m->toArray() as $behavior) { |
|
1844 | 1844 | if ($behavior instanceof $behaviorname) { |
1845 | 1845 | return $behavior; |
1846 | 1846 | } |