@@ -109,6 +109,7 @@ discard block |
||
109 | 109 | * |
110 | 110 | * Note: trailing "v" will be removed from version string. |
111 | 111 | * |
112 | + * @param string $binDir |
|
112 | 113 | * @return null|string |
113 | 114 | */ |
114 | 115 | public function getNodeJsLocalInstallVersion($binDir) |
@@ -284,6 +285,10 @@ discard block |
||
284 | 285 | } |
285 | 286 | } |
286 | 287 | |
288 | + /** |
|
289 | + * @param string $targetDir |
|
290 | + * @param boolean $isLocal |
|
291 | + */ |
|
287 | 292 | public function createBinScripts($binDir, $targetDir, $isLocal) |
288 | 293 | { |
289 | 294 | $cwd = getcwd(); |
@@ -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(); |
@@ -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"; |