Skip to content

Commit

Permalink
fix coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
azjezz committed Feb 17, 2021
1 parent c443bd1 commit 9ad1b77
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Psl/Type/Internal/DictType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use Psl\Type\Exception\AssertException;
use Psl\Type\Exception\CoercionException;

use function is_iterable;
use function is_array;
use function is_iterable;

/**
* @template Tk of array-key
Expand Down
2 changes: 1 addition & 1 deletion tests/Psl/Type/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getInvalidValues(): array
*/
public function testMatches($value): void
{
static::assertTrue($this->getType()->matches($value));
static::assertTrue($this->getType()->matches($value));
}

/**
Expand Down
10 changes: 10 additions & 0 deletions tests/Psl/Type/VecTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public function getType(): Type\TypeInterface

public function getValidCoercions(): iterable
{
yield [
[],
[]
];

yield [
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Expand Down Expand Up @@ -62,6 +67,11 @@ public function getValidCoercions(): iterable
Dict\map(Vec\range(1, 10), static fn(int $value): string => Str\format('00%d', $value)),
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
];

yield [
['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5],
[1, 2, 3, 4, 5]
];
}

public function getInvalidCoercions(): iterable
Expand Down

0 comments on commit 9ad1b77

Please sign in to comment.