Skip to content

removed dots at the end of @param and @return #19198

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
Jun 29, 2016

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Jun 28, 2016

Q A
Branch? 2.7
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

For phpdocs, we only add dots for sentences like description, but not for @param and @return for instance. This PR fixes this issue.

This should probably be added to PHP-CS-Fixer as well (/cc @phansys @keradus).

@nicolas-grekas
Copy link
Member

See failures :)

@fabpot fabpot force-pushed the dot-param-return-fix branch from 43eb67d to 554303e Compare June 28, 2016 06:24
@fabpot
Copy link
Member Author

fabpot commented Jun 28, 2016

tests fixed

@keradus
Copy link
Member

keradus commented Jun 28, 2016

@fabpot
Feel free to specify the requirements in PHP-CS-Fixer/PHP-CS-Fixer#2020 (exactly https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2020/files#diff-4e353d9e86349c0daec425c628ad5688R32 ), eg do we want to keep ? at the end or not (I would keep them, as during removal the sentence should be adjusted as well)

@fabpot fabpot merged commit 554303e into symfony:2.7 Jun 29, 2016
fabpot added a commit that referenced this pull request Jun 29, 2016
This PR was merged into the 2.7 branch.

Discussion
----------

removed dots at the end of @param and @return

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

For phpdocs, we only add dots for sentences like description, but not for @param and @return for instance. This PR fixes this issue.

This should probably be added to PHP-CS-Fixer as well (/cc @phansys @keradus).

Commits
-------

554303e removed dots at the end of @param and @return
keradus added a commit to PHP-CS-Fixer/PHP-CS-Fixer that referenced this pull request Jun 29, 2016
This PR was squashed before being merged into the 1.12 branch (closes #2020).

Discussion
----------

Added PhpdocAnnotationWithoutDotFixer

ref symfony/symfony#19198

Commits
-------

677b8aa Added PhpdocAnnotationWithoutDotFixer
@GrahamCampbell
Copy link
Contributor

@keradus PHP-CS-Fixer is removing them from other annotations like the deprecation one too. I don't think that is desired?

fabpot added a commit that referenced this pull request Sep 11, 2017
This PR was squashed before being merged into the 2.7 branch (closes #24149).

Discussion
----------

[CS] Apply phpdoc_annotation_without_dot

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Rule was manually applied here : #19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in PHP-CS-Fixer/PHP-CS-Fixer#2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.

Info: I did manually reviewed every single change of this PR.

Commits
-------

7a97b49 [CS] Apply phpdoc_annotation_without_dot
symfony-splitter pushed a commit to symfony/dom-crawler that referenced this pull request Sep 11, 2017
This PR was squashed before being merged into the 2.7 branch (closes #24149).

Discussion
----------

[CS] Apply phpdoc_annotation_without_dot

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Rule was manually applied here : symfony/symfony#19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in PHP-CS-Fixer/PHP-CS-Fixer#2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.

Info: I did manually reviewed every single change of this PR.

Commits
-------

7a97b49436 [CS] Apply phpdoc_annotation_without_dot
symfony-splitter pushed a commit to symfony/doctrine-bridge that referenced this pull request Sep 11, 2017
This PR was squashed before being merged into the 2.7 branch (closes #24149).

Discussion
----------

[CS] Apply phpdoc_annotation_without_dot

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Rule was manually applied here : symfony/symfony#19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in PHP-CS-Fixer/PHP-CS-Fixer#2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.

Info: I did manually reviewed every single change of this PR.

Commits
-------

7a97b49436 [CS] Apply phpdoc_annotation_without_dot
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.

5 participants