Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Additional sniffs and tests #10

Merged
merged 17 commits into from
Jan 1, 2019
Merged

Additional sniffs and tests #10

merged 17 commits into from
Jan 1, 2019

Conversation

michalbundyra
Copy link
Member

@xtreamwayz this is the second part I was talking about

We need to add some test for sniffs - I marked them with @todo tag.

Again, documentation is not updated, I can do it later or feel free to do it :)

<!-- Forbid useless semicolon `;` -->
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<!-- Forbid redundant semicolons -->
<rule ref="WebimpressCodingStandard.PHP.RedundantSemicolon"/>
Copy link
Member

Choose a reason for hiding this comment

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

Any reason for replacing these Slevomat tools with Webimpress ones, besides ownership?

'3';
$string = '1'
. '2'
. '3';
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't these two be aligned with the equal sign?

$string = '1'
        . '2'
        . '3';

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe it should but we don't have any sniff like that... And what if concatenation is in let say sprintf:

throw new \Exception(sprintf(
    'This is very very very long error message'
    . ' with some exception: %s',
    $e->getMessage()
));

There is so many cases. ScopeIndent from PHP_CodeSniffer doesn't include so many cases and my is super strict, and controversial in some places ;-) We can try, but ... hah

- no spaces around incrementation/decrementation
- no spaces after nullable oparator in nullable type declaration
@geerteltink geerteltink merged commit 31e54f1 into zendframework:develop Jan 1, 2019
geerteltink added a commit that referenced this pull request Jan 1, 2019

Verified

This commit was signed with the committer’s verified signature.
geerteltink Geert Eltink
Additional sniffs and tests
geerteltink added a commit that referenced this pull request Jan 1, 2019

Verified

This commit was signed with the committer’s verified signature.
geerteltink Geert Eltink
geerteltink added a commit that referenced this pull request Jan 1, 2019

Verified

This commit was signed with the committer’s verified signature.
geerteltink Geert Eltink
Close #10
@geerteltink
Copy link
Member

Thanx @webimpress

@michalbundyra michalbundyra deleted the feature/additional-sniffs branch January 2, 2019 04:32
@geerteltink geerteltink added this to the 2.0.0 milestone Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants