-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UseSpacingSniff: Don't report errors for use statements with comments…
… right before or after
- Loading branch information
Showing
9 changed files
with
259 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/Sniffs/Namespaces/data/useSpacingWithDefaultSettingsWithCommentsErrors.fixed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
/** | ||
* Something | ||
*/ | ||
use DateTimeImmutable; | ||
/** | ||
* Whatever | ||
*/ | ||
use function phpversion; | ||
use const PHP_VERSION; | ||
/** | ||
* Anything | ||
*/ | ||
use const PHP_VERSION_ID; | ||
/** | ||
* Nothing | ||
*/ | ||
|
||
class Whatever | ||
{ | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
tests/Sniffs/Namespaces/data/useSpacingWithDefaultSettingsWithCommentsErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
|
||
/** | ||
* Something | ||
*/ | ||
use DateTimeImmutable; | ||
|
||
/** | ||
* Whatever | ||
*/ | ||
use function phpversion; | ||
use const PHP_VERSION; | ||
|
||
/** | ||
* Anything | ||
*/ | ||
use const PHP_VERSION_ID; | ||
/** | ||
* Nothing | ||
*/ | ||
|
||
|
||
class Whatever | ||
{ | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
tests/Sniffs/Namespaces/data/useSpacingWithDefaultSettingsWithCommentsNoErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
/** | ||
* Something | ||
*/ | ||
use DateTimeImmutable; | ||
/** | ||
* Whatever | ||
*/ | ||
use function phpversion; | ||
use const PHP_VERSION; | ||
/** | ||
* Anything | ||
*/ | ||
use const PHP_VERSION_ID; | ||
/** | ||
* Nothing | ||
*/ | ||
|
||
class Whatever | ||
{ | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
tests/Sniffs/Namespaces/data/useSpacingWithDefaultSettingsWithInlineCommentsErrors.fixed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
// Something | ||
use DateTimeImmutable; | ||
// phpcs:disable Something | ||
use function phpversion; | ||
use const PHP_VERSION; | ||
// Anything | ||
use const PHP_VERSION_ID; | ||
// phpcs:enable | ||
|
||
class Whatever | ||
{ | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
tests/Sniffs/Namespaces/data/useSpacingWithDefaultSettingsWithInlineCommentsErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
|
||
// Something | ||
use DateTimeImmutable; | ||
|
||
// phpcs:disable Something | ||
use function phpversion; | ||
use const PHP_VERSION; | ||
|
||
// Anything | ||
use const PHP_VERSION_ID; | ||
// phpcs:enable | ||
|
||
|
||
class Whatever | ||
{ | ||
|
||
} |
Oops, something went wrong.