protected function getExecutedCommand()
{
$commandBinary = $_SERVER['PHP_SELF'];
$commandBinaryDir = dirname($commandBinary);
$pathDirs = explode(PATH_SEPARATOR, $_SERVER['PATH']);
if (in_array($commandBinaryDir, $pathDirs)) {
$commandBinary = basename($commandBinary);
}
$commandName = $this->getName();
if ('new' === $commandName) {
$commandArguments = sprintf('%s %s', $this->projectName, 'latest' !== $this->version ? $this->version : '');
} elseif ('demo' === $commandName) {
$commandArguments = '';
}
return sprintf('%s %s %s', $commandBinary, $commandName, $commandArguments);
}