Skip to content

Commit d6e5978

Browse files
authored
Apply using the str_starts_with function (#289)
1 parent 96c62ef commit d6e5978

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NewCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,11 +699,11 @@ protected function runCommands($commands, InputInterface $input, OutputInterface
699699
{
700700
if (! $output->isDecorated()) {
701701
$commands = array_map(function ($value) {
702-
if (substr($value, 0, 5) === 'chmod') {
702+
if (str_starts_with($value, 'chmod')) {
703703
return $value;
704704
}
705705

706-
if (substr($value, 0, 3) === 'git') {
706+
if (str_starts_with($value, 'git')) {
707707
return $value;
708708
}
709709

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

714714
if ($input->getOption('quiet')) {
715715
$commands = array_map(function ($value) {
716-
if (substr($value, 0, 5) === 'chmod') {
716+
if (str_starts_with($value, 'chmod')) {
717717
return $value;
718718
}
719719

720-
if (substr($value, 0, 3) === 'git') {
720+
if (str_starts_with($value, 'git')) {
721721
return $value;
722722
}
723723

0 commit comments

Comments
 (0)