Skip to content

Commit

Permalink
Merge pull request #26 from ergebnis/fix/iterable
Browse files Browse the repository at this point in the history
Fix: Do not bother checking iterable type
  • Loading branch information
localheinz committed Dec 23, 2019
2 parents 19b01f5 + 30265a4 commit 9ff8772
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ includes:
- phpstan-baseline.neon

parameters:
checkMissingIterableValueType: false
ergebnis:
classesAllowedToBeExtended:
- Ergebnis\PhpCsFixer\Config\RuleSet\AbstractRuleSet
Expand Down
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class Factory
* Creates a configuration based on a rule set.
*
* @param RuleSet $ruleSet
* @param array<string, bool|array<string, bool|string>> $overrideRules
* @param array $overrideRules
*
* @throws \RuntimeException
*
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function name(): string;
/**
* Returns an array of rules along with their configuration.
*
* @return array<string, bool|array<string, bool|string>>
* @return array
*/
public function rules(): array;

Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/AbstractRuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class AbstractRuleSet implements RuleSet
protected $name;

/**
* @var array<string, bool|array<string, bool|string>>
* @var array
*/
protected $rules = [];

Expand Down
3 changes: 0 additions & 3 deletions test/Unit/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ public function testFromRuleSetCreatesConfig(int $targetPhpVersion): void
self::assertSame($rules, $config->getRules());
}

/**
* @return \Generator<array<int>>
*/
public function providerTargetPhpVersion(): \Generator
{
$values = [
Expand Down
11 changes: 1 addition & 10 deletions test/Unit/RuleSet/AbstractRuleSetTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ abstract class AbstractRuleSetTestCase extends Framework\TestCase
protected $name;

/**
* @var array<string, bool|array<string, bool|string>>
* @var array
*/
protected $rules;

Expand Down Expand Up @@ -107,9 +107,6 @@ final public function testHeaderCommentFixerIsEnabledIfHeaderIsProvided($header)
self::assertSame($expected, $rules['header_comment']);
}

/**
* @return \Generator<array<string>>
*/
final public function providerValidHeader(): \Generator
{
$values = [
Expand Down Expand Up @@ -145,9 +142,6 @@ final public function testRulesAreSortedByName(string $source, array $ruleNames)
));
}

/**
* @return \Generator<array{0: string, 1: array<int, string>}>
*/
final public function providerRuleNames(): \Generator
{
$values = [
Expand Down Expand Up @@ -235,9 +229,6 @@ private function builtInFixers(): array
return $builtInFixers;
}

/**
* @return array<int, int|string>
*/
private function configuredFixers(): array
{
/**
Expand Down

0 comments on commit 9ff8772

Please sign in to comment.