Skip to content

Commit

Permalink
Apply using the str_starts_with function (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k authored Oct 13, 2023
1 parent 96c62ef commit d6e5978
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,11 @@ protected function runCommands($commands, InputInterface $input, OutputInterface
{
if (! $output->isDecorated()) {
$commands = array_map(function ($value) {
if (substr($value, 0, 5) === 'chmod') {
if (str_starts_with($value, 'chmod')) {
return $value;
}

if (substr($value, 0, 3) === 'git') {
if (str_starts_with($value, 'git')) {
return $value;
}

Expand All @@ -713,11 +713,11 @@ protected function runCommands($commands, InputInterface $input, OutputInterface

if ($input->getOption('quiet')) {
$commands = array_map(function ($value) {
if (substr($value, 0, 5) === 'chmod') {
if (str_starts_with($value, 'chmod')) {
return $value;
}

if (substr($value, 0, 3) === 'git') {
if (str_starts_with($value, 'git')) {
return $value;
}

Expand Down

0 comments on commit d6e5978

Please sign in to comment.