Skip to content

Commit

Permalink
Enable phpstan rule: checkMissingIterableValueType
Browse files Browse the repository at this point in the history
  • Loading branch information
jkniest committed Jun 3, 2024
1 parent 53437db commit 4741742
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ parameters:
# The level 9 is the highest level
level: 9

checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
6 changes: 6 additions & 0 deletions src/FixtureLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@

class FixtureLoader
{
/** @var array<Fixture> */
private readonly array $fixtures;

/**
* @param \Traversable<Fixture> $fixtures
*/
public function __construct(\Traversable $fixtures)
{
$this->fixtures = iterator_to_array($fixtures);
Expand Down Expand Up @@ -127,6 +131,8 @@ private function checkThatAllDependenciesAreInGroup(

/**
* Check if dependencies of fixture are also in the same group. If not, show error and stop process.
*
* @param array<string, Fixture> $references
*/
private function checkDependenciesAreInSameGroup(
Fixture $fixture,
Expand Down
3 changes: 3 additions & 0 deletions src/FixtureOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

readonly class FixtureOption
{
/**
* @param array<string> $fixtureNames
*/
public function __construct(
public bool $dryMode = false,
public ?string $groupName = null,
Expand Down

0 comments on commit 4741742

Please sign in to comment.