Skip to content

Commit c8f02aa

Browse files
committed
minor #1300 Use indented heredoc/nowdoc (javiereguiluz)
This PR was merged into the main branch. Discussion ---------- Use indented heredoc/nowdoc Let's leverage one of the best new features of PHP. Commits ------- 608e369 Use indented heredoc/nowdoc
2 parents 59d1811 + 608e369 commit c8f02aa

File tree

3 files changed

+29
-31
lines changed

3 files changed

+29
-31
lines changed

src/Command/AddUserCommand.php

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -228,27 +228,26 @@ private function validateUserData($username, $plainPassword, $email, $fullName):
228228
private function getCommandHelp(): string
229229
{
230230
return <<<'HELP'
231-
The <info>%command.name%</info> command creates new users and saves them in the database:
231+
The <info>%command.name%</info> command creates new users and saves them in the database:
232232
233-
<info>php %command.full_name%</info> <comment>username password email</comment>
233+
<info>php %command.full_name%</info> <comment>username password email</comment>
234234
235-
By default the command creates regular users. To create administrator users,
236-
add the <comment>--admin</comment> option:
235+
By default the command creates regular users. To create administrator users,
236+
add the <comment>--admin</comment> option:
237237
238-
<info>php %command.full_name%</info> username password email <comment>--admin</comment>
238+
<info>php %command.full_name%</info> username password email <comment>--admin</comment>
239239
240-
If you omit any of the three required arguments, the command will ask you to
241-
provide the missing values:
240+
If you omit any of the three required arguments, the command will ask you to
241+
provide the missing values:
242242
243-
# command will ask you for the email
244-
<info>php %command.full_name%</info> <comment>username password</comment>
243+
# command will ask you for the email
244+
<info>php %command.full_name%</info> <comment>username password</comment>
245245
246-
# command will ask you for the email and password
247-
<info>php %command.full_name%</info> <comment>username</comment>
246+
# command will ask you for the email and password
247+
<info>php %command.full_name%</info> <comment>username</comment>
248248
249-
# command will ask you for all arguments
250-
<info>php %command.full_name%</info>
251-
252-
HELP;
249+
# command will ask you for all arguments
250+
<info>php %command.full_name%</info>
251+
HELP;
253252
}
254253
}

src/Command/DeleteUserCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ protected function configure(): void
6262
$this
6363
->addArgument('username', InputArgument::REQUIRED, 'The username of an existing user')
6464
->setHelp(<<<'HELP'
65-
The <info>%command.name%</info> command deletes users from the database:
65+
The <info>%command.name%</info> command deletes users from the database:
6666
67-
<info>php %command.full_name%</info> <comment>username</comment>
67+
<info>php %command.full_name%</info> <comment>username</comment>
6868
69-
If you omit the argument, the command will ask you to
70-
provide the missing value:
69+
If you omit the argument, the command will ask you to
70+
provide the missing value:
7171
72-
<info>php %command.full_name%</info>
73-
HELP
72+
<info>php %command.full_name%</info>
73+
HELP
7474
);
7575
}
7676

src/Command/ListUsersCommand.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,20 @@ protected function configure(): void
6060
{
6161
$this
6262
->setHelp(<<<'HELP'
63-
The <info>%command.name%</info> command lists all the users registered in the application:
63+
The <info>%command.name%</info> command lists all the users registered in the application:
6464
65-
<info>php %command.full_name%</info>
65+
<info>php %command.full_name%</info>
6666
67-
By default the command only displays the 50 most recent users. Set the number of
68-
results to display with the <comment>--max-results</comment> option:
67+
By default the command only displays the 50 most recent users. Set the number of
68+
results to display with the <comment>--max-results</comment> option:
6969
70-
<info>php %command.full_name%</info> <comment>--max-results=2000</comment>
70+
<info>php %command.full_name%</info> <comment>--max-results=2000</comment>
7171
72-
In addition to displaying the user list, you can also send this information to
73-
the email address specified in the <comment>--send-to</comment> option:
72+
In addition to displaying the user list, you can also send this information to
73+
the email address specified in the <comment>--send-to</comment> option:
7474
75-
<info>php %command.full_name%</info> <comment>[email protected]</comment>
76-
77-
HELP
75+
<info>php %command.full_name%</info> <comment>[email protected]</comment>
76+
HELP
7877
)
7978
// commands can optionally define arguments and/or options (mandatory and optional)
8079
// see https://symfony.com/doc/current/components/console/console_arguments.html

0 commit comments

Comments
 (0)