Skip to content

Added more type hints and removed PHPdoc #839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Command/AddUserCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ private function validateUserData($username, $plainPassword, $email, $fullName)
* it's too long, it's better to define a separate method to maintain the
* code readability.
*/
private function getCommandHelp()
private function getCommandHelp(): string
{
return <<<'HELP'
The <info>%command.name%</info> command creates new users and saves them in the database:
Expand Down
5 changes: 1 addition & 4 deletions src/Command/ListUsersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ protected function execute(InputInterface $input, OutputInterface $output)

/**
* Sends the given $contents to the $recipient email address.
*
* @param string $contents
* @param string $recipient
*/
private function sendReport($contents, $recipient)
private function sendReport(string $contents, string $recipient): void
{
// See https://symfony.com/doc/current/cookbook/email/email.html
$message = $this->mailer->createMessage()
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/AppExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AppExtension extends AbstractExtension
private $localeCodes;
private $locales;

public function __construct(Markdown $parser, $locales)
public function __construct(Markdown $parser, string $locales)
{
$this->parser = $parser;
$this->localeCodes = explode('|', $locales);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ private function getMockedTransformer(array $findByReturnValues = []): TagArrayT

/**
* This helper method creates a Tag instance for the given tag name.
*
* @param string $name
*/
private function createTag($name): Tag
private function createTag(string $name): Tag
{
$tag = new Tag();
$tag->setName($name);
Expand Down