Skip to content
This repository has been 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 :)

@geerteltink geerteltink added this to In progress in Zend Coding Standard 2 via automation Dec 4, 2018
<!-- 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?

Zend Coding Standard 2 automation moved this from In progress to Reviewer approved Dec 4, 2018
'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
Zend Coding Standard 2 automation moved this from Reviewer approved to Done Jan 1, 2019
geerteltink added a commit that referenced this pull request Jan 1, 2019
geerteltink added a commit that referenced this pull request Jan 1, 2019
geerteltink added a commit that referenced this pull request Jan 1, 2019
@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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants