@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | // We want to get output from stdout, not from stderr. |
82 | 82 | // Therefore, we use proc_open. |
83 | 83 | $descriptorspec = array( |
84 | - 0 => array("pipe", "r"), // stdin |
|
85 | - 1 => array("pipe", "w"), // stdout |
|
86 | - 2 => array("pipe", "w"), // stderr |
|
84 | + 0 => array("pipe", "r"), // stdin |
|
85 | + 1 => array("pipe", "w"), // stdout |
|
86 | + 2 => array("pipe", "w"), // stderr |
|
87 | 87 | ); |
88 | 88 | $pipes = array(); |
89 | 89 | |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | } |
152 | 152 | } elseif (Environment::isWindows() && Environment::getArchitecture() == 64) { |
153 | 153 | if (version_compare($version, '4.0.0') >= 0) { |
154 | - return "https://nodejs.org/dist/v" . $version . "/win-x64/node.exe"; |
|
154 | + return "https://nodejs.org/dist/v".$version."/win-x64/node.exe"; |
|
155 | 155 | } else { |
156 | - return "https://nodejs.org/dist/v" . $version . "/x64/node.exe"; |
|
156 | + return "https://nodejs.org/dist/v".$version."/x64/node.exe"; |
|
157 | 157 | } |
158 | 158 | } elseif (Environment::isMacOS() && Environment::getArchitecture() == 32) { |
159 | 159 | return "https://nodejs.org/dist/v".$version."/node-v".$version."-darwin-x86.tar.gz"; |
@@ -110,6 +110,7 @@ discard block |
||
110 | 110 | * |
111 | 111 | * Note: trailing "v" will be removed from version string. |
112 | 112 | * |
113 | + * @param string $binDir |
|
113 | 114 | * @return null|string |
114 | 115 | */ |
115 | 116 | public function getNodeJsLocalInstallVersion($binDir) |
@@ -289,6 +290,10 @@ discard block |
||
289 | 290 | } |
290 | 291 | } |
291 | 292 | |
293 | + /** |
|
294 | + * @param string $targetDir |
|
295 | + * @param boolean $isLocal |
|
296 | + */ |
|
292 | 297 | public function createBinScripts($binDir, $targetDir, $isLocal) |
293 | 298 | { |
294 | 299 | if (!file_exists($binDir)) { |
@@ -316,6 +321,7 @@ discard block |
||
316 | 321 | * @param string $fullTargetDir |
317 | 322 | * @param string $scriptName |
318 | 323 | * @param bool $isLocal |
324 | + * @param string $target |
|
319 | 325 | */ |
320 | 326 | private function createBinScript($binDir, $fullTargetDir, $scriptName, $target, $isLocal) |
321 | 327 | { |
@@ -376,6 +382,10 @@ discard block |
||
376 | 382 | return (strlen($relativePath) === 0) ? './' : $relativePath; |
377 | 383 | } |
378 | 384 | |
385 | + /** |
|
386 | + * @param string $zipFileName |
|
387 | + * @param string $targetDir |
|
388 | + */ |
|
379 | 389 | private function unzip($zipFileName, $targetDir) |
380 | 390 | { |
381 | 391 | $zip = new \ZipArchive(); |
@@ -243,6 +243,7 @@ |
||
243 | 243 | /** |
244 | 244 | * Uninstalls NodeJS. |
245 | 245 | * Note: other classes cannot be loaded here since the package has already been removed. |
246 | + * @param string $targetDir |
|
246 | 247 | */ |
247 | 248 | private function onUninstall($binDir, $targetDir) |
248 | 249 | { |