-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Incorrect PHPDoc Formatting #1
Labels
Comments
@Jubeki Yes. Do you mind of pull requesting that? |
Sure, I will do that. |
Just a quick question on Laravel's docblock style with the double spaces thing. I notice pint is correcting to 4 spaces on a few of our docblocks because we specify a @param without a type... Is a type required to be a valid phpdoc block? |
ablancobarreda
added a commit
to ablancobarreda/pint
that referenced
this issue
Jan 5, 2023
3 upload images
ablancobarreda
added a commit
to ablancobarreda/pint
that referenced
this issue
Jan 5, 2023
Merge pull request laravel#1 from ablancobarreda/3--UploadImages
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Description:
The Laravel Code Style has the following style throughout the source code:
laravel_phpdoc_alignment
After
@param
should be two spaces then atype-hint
then another two spaces and then the$variable
laravel_phpdoc_order
First should be the
description
after that@param
then@return
and at last@throws
The default rule
phpdoc_order
has a different order:description
,@param
,@throws
,@return
laravel_phpdoc_seperation
Between each group of tags should be an empty line for seperation.
@param
and@return
are always of the same group and are not to be seperated with an empty line.The default behaviour for
phpdoc_seperation
is also an empty line between@param
and@return
.Steps To Reproduce:
Possible Solution
Since there are no default rules for PHP-CS-Fixer I created custom ones.
There are three Fixers for PHP-CS-Fixer which could be included here.
https://github.com/Jubeki/laravel-code-style/tree/main/src/Fixers
Do you have an interest in a PR?
The text was updated successfully, but these errors were encountered: