Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@Gramzivi
Copy link

QA
Branch?master
Bug fix?no
New feature?yes/no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PRsymfony/symfony-docs#...

Add PHPDoc missing params for Messanger Stamps

@ogizanagi
Copy link
Contributor

ogizanagi commentedDec 8, 2018
edited
Loading

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 theSendStamp::__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.

}

/**
* @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

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 freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof requested changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@Gramzivi@ogizanagi@ro0NL@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp