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

Comments in code exceeds 120 characters #176

Open
sone12 opened this issue Dec 11, 2019 · 6 comments
Open

Comments in code exceeds 120 characters #176

sone12 opened this issue Dec 11, 2019 · 6 comments

Comments

@sone12
Copy link

sone12 commented Dec 11, 2019

PHP Code Sniffer complains about Line exceeds 120 characters for a lot of lines in Dice.php

@TRPB
Copy link
Member

TRPB commented Dec 15, 2019

If there is a technical reason that 120 is highlighted as a cut-off point I'll consider changing it. However, 120 characters seems to have been chosen entirely arbitrarily.

@sone12
Copy link
Author

sone12 commented Dec 16, 2019

The PSR coding standard says
ref: https://www.php-fig.org/psr/psr-12/

The soft limit on line length MUST be 120 characters.

Lines SHOULD NOT be longer than 80 characters; lines longer than that SHOULD be split into multiple subsequent lines of no more than 80 characters each.

@TRPB
Copy link
Member

TRPB commented Dec 16, 2019

PSR-2 is subjective and inconsistent. This repo does not follow it and has no intention of doing so.

@sone12
Copy link
Author

sone12 commented Dec 16, 2019

The only thing that fails in PSR validation with PHP code sniffer is the «comments» with long sentence.

@moozeek
Copy link

moozeek commented Dec 16, 2019

I agree with Tom. What's the point of this rule?
So everyone please just add an exclusion pattern to your phpcs ruleset and move on:

<exclude-pattern>*/vendor/*</exclude-pattern>

@garrettw
Copy link

garrettw commented Dec 16, 2019

<exclude-pattern>*/vendor/*</exclude-pattern>

Just keep in mind that this line will only work if you're using Dice as a dependency, but not if you are working on the Dice package itself.

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

No branches or pull requests

4 participants