@@ -93,15 +93,15 @@ |
||
93 | 93 | { |
94 | 94 | $options = []; |
95 | 95 | |
96 | - if($this->isDiffMode()) { |
|
96 | + if ($this->isDiffMode()) { |
|
97 | 97 | $options[] = '-d'; |
98 | 98 | } |
99 | 99 | |
100 | - if($this->isEasyMode()) { |
|
100 | + if ($this->isEasyMode()) { |
|
101 | 101 | $options[] = '-y'; |
102 | 102 | } |
103 | 103 | |
104 | - if($this->isReadonlyMode()) { |
|
104 | + if ($this->isReadonlyMode()) { |
|
105 | 105 | $options[] = '-R'; |
106 | 106 | } |
107 | 107 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | use LTDBeget\vim\Options; |
9 | 9 | use LTDBeget\vim\Vim; |
10 | 10 | |
11 | - require(__DIR__ . '/vendor/autoload.php'); |
|
11 | + require(__DIR__.'/vendor/autoload.php'); |
|
12 | 12 | |
13 | 13 | $vim = new Vim( |
14 | 14 | (new Options())->setDiffMode(true)->setReadonlyMode(true) |
@@ -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 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | private function getFilesPath() : array |
107 | 107 | { |
108 | - $paths =[]; |
|
108 | + $paths = []; |
|
109 | 109 | foreach ($this->tempFiles as $fileResource) { |
110 | 110 | $paths[] = stream_get_meta_data($fileResource)['uri']; |
111 | 111 | } |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | private function getCommand() : string |
119 | 119 | { |
120 | 120 | return |
121 | - $this->editor . ' ' . |
|
122 | - (string) $this->options . ' ' . |
|
121 | + $this->editor.' '. |
|
122 | + (string) $this->options.' '. |
|
123 | 123 | implode(' ', array_map(function(string $path) { |
124 | 124 | return escapeshellarg($path); |
125 | - }, $this->getFilesPath())) . ' ' . |
|
125 | + }, $this->getFilesPath())).' '. |
|
126 | 126 | sprintf('> /proc/%s/fd/1', posix_getpid()); |
127 | 127 | } |
128 | 128 | } |
129 | 129 | \ No newline at end of file |