@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | public function __construct(Options $options = NULL) |
43 | 43 | { |
44 | 44 | $editor = shell_exec('which vim'); |
45 | - if(empty($editor)) { |
|
45 | + if (empty($editor)) { |
|
46 | 46 | throw new \LogicException('Install vim'); |
47 | 47 | } |
48 | - $this->editor = trim($editor); |
|
48 | + $this->editor = trim($editor); |
|
49 | 49 | $this->options = $options ?? new Options(); |
50 | 50 | } |
51 | 51 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function __destruct() |
105 | 105 | { |
106 | 106 | foreach ($this->getFilesPath() as $fileName) { |
107 | - if(is_file($fileName)) { |
|
107 | + if (is_file($fileName)) { |
|
108 | 108 | unlink($fileName); |
109 | 109 | } |
110 | 110 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | private function getFilesPath() : array |
117 | 117 | { |
118 | - $paths =[]; |
|
118 | + $paths = []; |
|
119 | 119 | foreach ($this->tempFiles as $fileName) { |
120 | 120 | $paths[] = $fileName; |
121 | 121 | } |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | private function getCommand() : string |
129 | 129 | { |
130 | 130 | return |
131 | - $this->editor . ' ' . |
|
132 | - (string) $this->options . ' ' . |
|
131 | + $this->editor.' '. |
|
132 | + (string) $this->options.' '. |
|
133 | 133 | implode(' ', array_map(function(string $path) { |
134 | 134 | return escapeshellarg($path); |
135 | - }, $this->getFilesPath())) . ' ' . |
|
135 | + }, $this->getFilesPath())).' '. |
|
136 | 136 | sprintf('> /proc/%s/fd/1', posix_getpid()); |
137 | 137 | } |
138 | 138 | } |
139 | 139 | \ No newline at end of file |