2021-02-20 11:45:25 +07:00
|
|
|
Function Add-ToolsHelper() {
|
|
|
|
Param (
|
|
|
|
[Parameter(Position = 0, Mandatory = $true)]
|
|
|
|
[ValidateNotNull()]
|
|
|
|
$tool
|
|
|
|
)
|
|
|
|
if($tool -eq "codeception") {
|
|
|
|
Copy-Item $composer_bin\codecept.bat -Destination $composer_bin\codeception.bat
|
|
|
|
} elseif($tool -eq "composer") {
|
|
|
|
Edit-ComposerConfig $bin_dir\$tool
|
|
|
|
} elseif($tool -eq "cs2pr") {
|
|
|
|
(Get-Content $bin_dir/cs2pr).replace('exit(9)', 'exit(0)') | Set-Content $bin_dir/cs2pr
|
|
|
|
} elseif($tool -eq "phan") {
|
|
|
|
Add-Extension fileinfo >$null 2>&1
|
|
|
|
Add-Extension ast >$null 2>&1
|
|
|
|
} elseif($tool -eq "phive") {
|
|
|
|
Add-Extension xml >$null 2>&1
|
2021-09-20 06:56:43 +07:00
|
|
|
} elseif($tool -eq "phpDocumentor") {
|
|
|
|
Add-Extension fileinfo >$null 2>&1
|
|
|
|
Copy-Item $bin_dir\phpDocumentor.bat -Destination $bin_dir\phpdoc.bat
|
2021-07-05 17:33:10 +07:00
|
|
|
} elseif($tool -eq "symfony-cli") {
|
|
|
|
Add-ToProfile $current_profile "symfony" "New-Alias symfony $bin_dir\symfony-cli.exe"
|
|
|
|
Add-ToProfile $current_profile "symfony_cli" "New-Alias symfony-cli $bin_dir\symfony-cli.exe"
|
|
|
|
} elseif($tool -match "vapor-cli") {
|
2021-02-20 11:45:25 +07:00
|
|
|
Copy-Item $composer_bin\vapor.bat -Destination $composer_bin\vapor-cli.bat
|
|
|
|
} elseif($tool -eq "wp-cli") {
|
|
|
|
Copy-Item $bin_dir\wp-cli.bat -Destination $bin_dir\wp.bat
|
|
|
|
}
|
|
|
|
}
|