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

TraitUseSpacingSniff: Add linesCountBeforeFirstUseWhenFirstInClass #866 #870

Merged

Conversation

thled
Copy link
Contributor

@thled thled commented Jan 28, 2020

Hello,

I prepared this PR for my issue #866 from last week.

It adds a linesCountBeforeFirstUseWhenFirstInClass setting to the SlevomatCodingStandard.Classes.TraitUseSpacing sniff.

Copy link
Contributor

@kukulich kukulich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be in one commit please.

@@ -28,6 +28,9 @@ class TraitUseSpacingSniff implements Sniff
/** @var int */
public $linesCountBeforeFirstUse = 1;

/** @var int */
public $linesCountBeforeFirstUseWhenFirstInClass = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the default to null to be compatible with actual version. If the variable is null, use linesCountBeforeFirstUse.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@thled thled force-pushed the thled/linesCountBeforeFirstUseWhenFirstInClass branch from 7500118 to 14aee87 Compare January 29, 2020 06:46
@kukulich kukulich merged commit b92dc40 into slevomat:master Jan 29, 2020
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.

None yet

2 participants