@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * For the full copyright and license information, please view the LICENSE |
8 | 8 | * file that was distributed with this source code. |
9 | 9 | */ |
10 | -declare(strict_types=1); |
|
10 | +declare(strict_types = 1); |
|
11 | 11 | namespace PhpFlo\Logger; |
12 | 12 | |
13 | 13 | use Psr\Log\AbstractLogger; |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | $log = pathinfo($logFile); |
44 | 44 | // check if $logFile is a dir because of possible stream url |
45 | 45 | $isLogdir = is_dir($logFile); |
46 | - if (!$isLogdir && (isset($log['dirname']) && !is_dir($log['dirname']))) { |
|
46 | + if (!$isLogdir && (isset($log[ 'dirname' ]) && !is_dir($log[ 'dirname' ]))) { |
|
47 | 47 | throw new \InvalidArgumentException( |
48 | - "Directory does not exist: {$log['dirname']}" |
|
48 | + "Directory does not exist: {$log[ 'dirname' ]}" |
|
49 | 49 | ); |
50 | 50 | } |
51 | 51 | |
52 | - if ($isLogdir || !isset($log['filename'])) { |
|
53 | - $logFile = $logFile . DIRECTORY_SEPARATOR . self::DEFAULT_FILENAME; |
|
52 | + if ($isLogdir || !isset($log[ 'filename' ])) { |
|
53 | + $logFile = $logFile.DIRECTORY_SEPARATOR.self::DEFAULT_FILENAME; |
|
54 | 54 | } |
55 | 55 | $this->logFile = $logFile; |
56 | 56 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | { |
71 | 71 | if (in_array($level, $this->levels)) { |
72 | 72 | file_put_contents( |
73 | - $this->logFile, $message . PHP_EOL, FILE_APPEND |
|
73 | + $this->logFile, $message.PHP_EOL, FILE_APPEND |
|
74 | 74 | ); |
75 | 75 | } |
76 | 76 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * For the full copyright and license information, please view the LICENSE |
8 | 8 | * file that was distributed with this source code. |
9 | 9 | */ |
10 | -declare(strict_types=1); |
|
10 | +declare(strict_types = 1); |
|
11 | 11 | namespace PhpFlo; |
12 | 12 | |
13 | 13 | use PhpFlo\Common\AbstractNetworkDecorator; |
@@ -90,21 +90,21 @@ discard block |
||
90 | 90 | */ |
91 | 91 | private function traceData(array $args, string $type) |
92 | 92 | { |
93 | - $data = $args[0]; |
|
94 | - $socket = $args[1]; |
|
93 | + $data = $args[ 0 ]; |
|
94 | + $socket = $args[ 1 ]; |
|
95 | 95 | |
96 | 96 | if (!is_string($data)) { |
97 | 97 | $data = serialize($data); |
98 | 98 | } |
99 | 99 | $to = $socket->to(); |
100 | - $message = "-> {$to['port']} {$to['process']['id']}"; |
|
100 | + $message = "-> {$to[ 'port' ]} {$to[ 'process' ][ 'id' ]}"; |
|
101 | 101 | |
102 | 102 | $from = $socket->from(); |
103 | - if (isset($from['process'])) { |
|
104 | - $message = " {$from['process']['id']} {$from['port']} {$message}"; |
|
103 | + if (isset($from[ 'process' ])) { |
|
104 | + $message = " {$from[ 'process' ][ 'id' ]} {$from[ 'port' ]} {$message}"; |
|
105 | 105 | } |
106 | 106 | |
107 | - $this->logger->info("{$message} {$this->actions[$type]} {$data}"); |
|
107 | + $this->logger->info("{$message} {$this->actions[ $type ]} {$data}"); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -113,15 +113,15 @@ discard block |
||
113 | 113 | */ |
114 | 114 | private function traceAction(array $args, string $type) |
115 | 115 | { |
116 | - $socket = $args[0]; |
|
116 | + $socket = $args[ 0 ]; |
|
117 | 117 | $to = $socket->to(); |
118 | - $message = "-> {$to['port']} {$to['process']['id']}"; |
|
118 | + $message = "-> {$to[ 'port' ]} {$to[ 'process' ][ 'id' ]}"; |
|
119 | 119 | |
120 | 120 | $from = $socket->from(); |
121 | - if (isset($from['process'])) { |
|
122 | - $message = " {$from['process']['id']} {$from['port']} {$message}"; |
|
121 | + if (isset($from[ 'process' ])) { |
|
122 | + $message = " {$from[ 'process' ][ 'id' ]} {$from[ 'port' ]} {$message}"; |
|
123 | 123 | } |
124 | 124 | |
125 | - $this->logger->debug("{$message} {$this->actions[$type]}"); |
|
125 | + $this->logger->debug("{$message} {$this->actions[ $type ]}"); |
|
126 | 126 | } |
127 | 127 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | * For the full copyright and license information, please view the LICENSE |
8 | 8 | * file that was distributed with this source code. |
9 | 9 | */ |
10 | -declare(strict_types=1); |
|
10 | +declare(strict_types = 1); |
|
11 | 11 | namespace PhpFlo\Common; |
12 | 12 | |
13 | 13 | /** |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * For the full copyright and license information, please view the LICENSE |
8 | 8 | * file that was distributed with this source code. |
9 | 9 | */ |
10 | -declare(strict_types=1); |
|
10 | +declare(strict_types = 1); |
|
11 | 11 | namespace PhpFlo\Test; |
12 | 12 | |
13 | 13 | /** |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | protected function stub( |
37 | 37 | string $class, |
38 | - array $methods = [], |
|
38 | + array $methods = [ ], |
|
39 | 39 | string $className = '', |
40 | 40 | bool $forceMethods = false |
41 | 41 | ) : \PHPUnit_Framework_MockObject_MockObject { |