Php-cs-fixer: Does fixer for Laravel 5 PHPDoc Style Guide already exist?

Created on 7 Dec 2016  路  11Comments  路  Source: FriendsOfPHP/PHP-CS-Fixer

Is there a fixer for phpdoc for larave style guide?
https://laravel.com/docs/5.3/contributions#phpdoc

kinquestion

Most helpful comment

@GrahamCampbell I was wondering if you've already found some time to start working on the laravel style fixer?

All 11 comments

Note that the @param attribute is followed by two spaces, the argument type, two more spaces, and finally the variable name:

There is no fixer for that within the repo here.

Yeh, I'm planning to write one when I find the time. :)

This has been discussed already on the laravel/framework repo. :)

just out of curiosity, why does laravel have all these CS exceptions that no other project follows, it is not legacy so why?

I'm glad to know that. Thanks GrahamCampBell. I'm excited for it. :D

just out of curiosity, why does laravel have all these CS exceptions that no other project follows, it is not legacy so why?

Ha, we're lucky we moved over to PSR-2 at least. TBH, our code standards aren't that exotic any more. They're very similar to Symfony these days. Could be worse, we could want wordpress cs.

I'm wondering, if there's no fixer for laravel's phpdoc, then it means developers and Taylor Otwell manually check the phpdoc code style?

I already wrote quite a few phpdoc fixers for php-cs-fixer, which laravel does already use, but that 2 spaces thing isn't actually enforced in the codebase yet, and nor are we accepting PRs for it. We just softly apply that rule to new code. Once we have a fixer, I'll apply the rule across the codebase.

Could be worse, we could want wordpress cs.

that's crazies standards I have ever seen :D

OK, raised issue was actually a question, it was answered, therefore I'm closing the issue.
Still, feel free to continue discussion and welcome to open a PR !

@GrahamCampbell I was wondering if you've already found some time to start working on the laravel style fixer?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fisharebest picture fisharebest  路  3Comments

Bilge picture Bilge  路  3Comments

grachevko picture grachevko  路  3Comments

amitbisht511 picture amitbisht511  路  3Comments

teohhanhui picture teohhanhui  路  3Comments