<?php shell_exec(string $command): string|false|null
<?php protected function getCurrentBranch(string $directory): string { $branch = "'".trim(shell_exec("cd ${directory}; git branch | grep \\* | cut -d ' ' -f2"))."'"; if (! isset($branch) || $branch === "''") { $branch = 'current branch';