Skip to content
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

With changes to pass StyleCI Laravel format. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

With changes to pass StyleCI Laravel format. #11

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 16, 2017

  • Blank lines around parameters
  • Align PHPDoc Comments
  • Align key value pairs

- Blank lines around parameters
- Align key value pairs
@michaeldyrynda
Copy link
Owner

The tricky thing I found with aligning of the comments, is that Laravel uses two spaces to separate the annotation, the type, and the variable name - they're not aligned to columns, and I've not seen any implementation - PhpStorm, PHP-CS-Fixer, or otherwise - that handles this.

I suspect this is something that StyleCI implements itself. The last time I asked @GrahamCampbell about it, I was told something along the lines of "don't worry, StyleCI will do that for you" - this may have changed and I'd love to know if there's a PHPCS fixer for it!

@IfnotFr
Copy link
Contributor

IfnotFr commented Jun 2, 2017

Yeah, sadly atm we cannot format PHPDoc comments with the available PHP Storm options :(

But what about PHPDOC_BLANK_LINES_AROUND_PARAMETERS ?

@michaeldyrynda
Copy link
Owner

Does that add a blank line before the @return annotation? Is there a separate config setting to prevent this?

@jonnywilliamson
Copy link

Hi guys. A project I'm working on has implemented styleci with the laravel preset.

Is this code-style still working as close as possible to it in phpstorm now that we're at version 2017.2 with likely more options than before?

@michaeldyrynda
Copy link
Owner

Hey @jonnywilliamson my understanding is it is as-close as possible, but i'm not using PhpStorm so couldn't say for certain. If you come across any inconsistencies, happy to accept a PR to keep it up to date.

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

Successfully merging this pull request may close these issues.

3 participants