@@ -35,14 +35,14 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $log = pathinfo($logFile); |
| 37 | 37 | |
| 38 | - if (isset($log['dirname']) && !is_dir($log['dirname'])) { |
|
| 38 | + if (isset($log[ 'dirname' ]) && !is_dir($log[ 'dirname' ])) { |
|
| 39 | 39 | throw new \InvalidArgumentException( |
| 40 | - "Directory does not exist: {$log['dirname']}" |
|
| 40 | + "Directory does not exist: {$log[ 'dirname' ]}" |
|
| 41 | 41 | ); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - if (!isset($log['filename'])) { |
|
| 45 | - $log['filename'] = self::DEFAULT_FILENAME; |
|
| 44 | + if (!isset($log[ 'filename' ])) { |
|
| 45 | + $log[ 'filename' ] = self::DEFAULT_FILENAME; |
|
| 46 | 46 | } |
| 47 | 47 | $this->logFile = $logFile; |
| 48 | 48 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function log($level, $message, array $context = array()) |
| 60 | 60 | { |
| 61 | 61 | file_put_contents( |
| 62 | - $this->logFile, $message . PHP_EOL, FILE_APPEND |
|
| 62 | + $this->logFile, $message.PHP_EOL, FILE_APPEND |
|
| 63 | 63 | ); |
| 64 | 64 | } |
| 65 | 65 | } |
@@ -45,17 +45,17 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | private function trace() |
| 47 | 47 | { |
| 48 | - $trace = function ($data, $socket) { |
|
| 48 | + $trace = function($data, $socket) { |
|
| 49 | 49 | if (!is_string($data)) { |
| 50 | 50 | $data = serialize($data); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $to = $socket->to(); |
| 54 | - $message = "-> {$to['port']} {$to['process']}"; |
|
| 54 | + $message = "-> {$to[ 'port' ]} {$to[ 'process' ]}"; |
|
| 55 | 55 | |
| 56 | 56 | $from = $socket->from(); |
| 57 | - if (isset($from['process'])) { |
|
| 58 | - $message = "{$from['process']} {$from['port']} " . $message; |
|
| 57 | + if (isset($from[ 'process' ])) { |
|
| 58 | + $message = "{$from[ 'process' ]} {$from[ 'port' ]} ".$message; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $this->logger->debug($message); |