diff --git a/src/Concerns/RunsCommands.php b/src/Concerns/RunsCommands.php index 4807642..3bd951c 100644 --- a/src/Concerns/RunsCommands.php +++ b/src/Concerns/RunsCommands.php @@ -9,12 +9,9 @@ trait RunsCommands /** * Run the given command. * - * @param string $command - * @param string|null $workingPath - * @param bool $disableOutput * @return Process */ - protected function runCommand(string $command, string $workingPath = null, bool $disableOutput = false) + protected function runCommand(string $command, ?string $workingPath = null, bool $disableOutput = false) { return $this->runCommands([$command], $workingPath, $disableOutput); } @@ -22,12 +19,9 @@ protected function runCommand(string $command, string $workingPath = null, bool /** * Run the given commands. * - * @param array $commands - * @param string|null $workingPath - * @param bool $disableOutput * @return Process */ - protected function runCommands(array $commands, string $workingPath = null, bool $disableOutput = false) + protected function runCommands(array $commands, ?string $workingPath = null, bool $disableOutput = false) { if (! $this->output->isDecorated()) { $commands = array_map(function ($value) { diff --git a/src/NewCommand.php b/src/NewCommand.php index 2c372d3..d17c0c8 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -23,9 +23,7 @@ use Symfony\Component\Process\Process; use function Laravel\Prompts\confirm; -use function Laravel\Prompts\error; use function Laravel\Prompts\intro; -use function Laravel\Prompts\multiselect; use function Laravel\Prompts\select; use function Laravel\Prompts\suggest; use function Laravel\Prompts\text; @@ -681,14 +679,14 @@ protected function installSsg() } $this->output->write(PHP_EOL); - intro("Installing the Static Site Generator addon..."); + intro('Installing the Static Site Generator addon...'); $statusCode = (new Please($this->output)) ->cwd($this->absolutePath) - ->run("install:ssg"); + ->run('install:ssg'); if ($statusCode !== 0) { - throw new RuntimeException("There was a problem installing the Static Site Generator addon!"); + throw new RuntimeException('There was a problem installing the Static Site Generator addon!'); } return $this; @@ -830,8 +828,6 @@ protected function initializeGitRepository() /** * Check if Git is installed. - * - * @return bool */ protected function isGitInstalled(): bool { @@ -844,8 +840,6 @@ protected function isGitInstalled(): bool /** * Return the local machine's default Git branch if set or default to `main`. - * - * @return string */ protected function defaultBranch(): string { @@ -928,8 +922,6 @@ protected function pushToGithub() /** * Check if GitHub's GH CLI tool is installed. - * - * @return bool */ protected function isGhInstalled(): bool { @@ -999,11 +991,11 @@ protected function askToEnableStatamicPro() $this->pro = confirm( label: 'Do you want to enable Statamic Pro?', default: true, - hint: "Statamic Pro is required for some features. Like Multi-site, the Git integration, and more." + hint: 'Statamic Pro is required for some features. Like Multi-site, the Git integration, and more.' ); if ($this->pro) { - $this->output->write(" Before your site goes live, you will need to purchase a license on statamic.com.".PHP_EOL.PHP_EOL); + $this->output->write(' Before your site goes live, you will need to purchase a license on statamic.com.'.PHP_EOL.PHP_EOL); } return $this; @@ -1074,7 +1066,7 @@ protected function askToSpreadJoy() } $response = select('Would you like to spread the joy of Statamic by starring the repo?', [ - $yes = "Absolutely", + $yes = 'Absolutely', $no = 'Maybe later', ], $no); diff --git a/src/Please.php b/src/Please.php index f7ec594..14eab00 100644 --- a/src/Please.php +++ b/src/Please.php @@ -13,8 +13,6 @@ class Please /** * Instantiate Statamic `please` command wrapper. - * - * @param OutputInterface $output */ public function __construct(OutputInterface $output) { diff --git a/src/UpdateCommand.php b/src/UpdateCommand.php index fca497a..adad171 100644 --- a/src/UpdateCommand.php +++ b/src/UpdateCommand.php @@ -30,8 +30,6 @@ protected function configure() /** * Execute the command. * - * @param InputInterface $input - * @param OutputInterface $output * @return int */ protected function execute(InputInterface $input, OutputInterface $output) diff --git a/src/VersionCommand.php b/src/VersionCommand.php index cd4be27..3a1531c 100644 --- a/src/VersionCommand.php +++ b/src/VersionCommand.php @@ -23,8 +23,6 @@ protected function configure() /** * Execute the command. * - * @param InputInterface $input - * @param OutputInterface $output * @return int */ protected function execute(InputInterface $input, OutputInterface $output)