-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
55 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Ptscs\Tests\Sniffs\Slevomat\TypeHints; | ||
|
||
use Iterator; | ||
use Ptscs\Tests\SniffTestCase; | ||
use Ptscs\Tests\Utils\ErrorData; | ||
|
||
final class ParameterTypeHintTest extends SniffTestCase | ||
{ | ||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->appendExclude('Squiz.Classes.ClassFileName.NoMatch'); | ||
} | ||
|
||
public static function provideTestData(): Iterator | ||
{ | ||
yield [ | ||
[ | ||
new ErrorData(8, 'SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation'), | ||
], | ||
]; | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
tests/Sniffs/Slevomat/TypeHints/_data/ParameterTypeHint.php.fixed
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,12 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace App; | ||
|
||
final class Foobar | ||
{ | ||
/** | ||
*/ | ||
public function check(string $useless, array $list, $missing): void | ||
{ | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/Sniffs/Slevomat/TypeHints/_data/ParameterTypeHint.php.inc
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,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace App; | ||
|
||
final class Foobar | ||
{ | ||
/** | ||
* @param string $useless | ||
*/ | ||
public function check(string $useless, array $list, $missing): void | ||
{ | ||
} | ||
} |
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