Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HackDay][Messanger]Improve PHP DocBlock for Messanger Stamps #29529

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

Closed

Conversation

Gramzivi
Copy link

@Gramzivi Gramzivi commented Dec 8, 2018

Q A
Branch? master
Bug fix? no
New feature? yes/no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR symfony/symfony-docs#...

Add PHPDoc missing params for Messanger Stamps

@ogizanagi
Copy link
Contributor

ogizanagi commented Dec 8, 2018

Thanks for taking the time to prepare and suggest these changes @Gramzivi. But actually we try to avoid adding "useless" phpdoc and you'll find a bunch of PRs in this repository trying to remove any of these unnecessary docblocks (see #25859 for instance).

By "useless" here, I mean:

  • not-required like property types which are guessed by IDEs from constructor's typehints/docblock
  • redundant @param or @return types when there is already a typehint/return type
  • comments not adding any value, like "SentStamp constructor" on the SendStamp::__construct() method.

I hope you'll understand and keep trying to contribute :)

private $result;

/**
* @var string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't add @var phpdoc on properties in Symfony, especially when the constructor allows IDEs to infer it already.

@@ -77,11 +94,17 @@ public function getResult()
return $this->result;
}

/**
* @return string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this phpdoc. We don't add it when it provides no value compared to the signature. Here, it only duplicates the return type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, this applies to most places changed in that PR.

@ro0NL
Copy link
Contributor

ro0NL commented Dec 8, 2018

https://symfony.com/doc/current/contributing/code/standards.html#documentation

though you may be asked to remove PHPDoc that do not add value

We should start clarifying this :) and perhaps add a mention in the PR template even.

@nicolas-grekas
Copy link
Member

Closing as explained, thanks for submitting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants