function Common::escapeshellcmd
Escape a path to a system command.
Parameters
string $cmd The path to the system command.:
Return value
string
9 calls to Common::escapeshellcmd()
- ClosureLinterSniff::process in vendor/
squizlabs/ php_codesniffer/ src/ Standards/ Generic/ Sniffs/ Debug/ ClosureLinterSniff.php - Processes the tokens that this sniff is interested in.
- CodeAnalyzerSniff::process in vendor/
squizlabs/ php_codesniffer/ src/ Standards/ Zend/ Sniffs/ Debug/ CodeAnalyzerSniff.php - Processes the tokens that this sniff is interested in.
- CSSLintSniff::process in vendor/
squizlabs/ php_codesniffer/ src/ Standards/ Generic/ Sniffs/ Debug/ CSSLintSniff.php - Processes the tokens that this sniff is interested in.
- ESLintSniff::process in vendor/
squizlabs/ php_codesniffer/ src/ Standards/ Generic/ Sniffs/ Debug/ ESLintSniff.php - Processes the tokens that this sniff is interested in.
- JavaScriptLintSniff::process in vendor/
squizlabs/ php_codesniffer/ src/ Standards/ Squiz/ Sniffs/ Debug/ JavaScriptLintSniff.php - Processes the tokens that this sniff is interested in.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Util/ Common.php, line 252
Class
Namespace
PHP_CodeSniffer\UtilCode
public static function escapeshellcmd($cmd) {
$cmd = escapeshellcmd($cmd);
if (stripos(PHP_OS, 'WIN') === 0) {
// Spaces are not escaped by escapeshellcmd on Windows, but need to be
// for the command to be able to execute.
$cmd = preg_replace('`(?<!^) `', '^ ', $cmd);
}
return $cmd;
}