fix coding standards

This commit is contained in:
azjezz 2021-02-17 20:26:15 +01:00 committed by Saif Eddin Gmati
parent 57a8741d71
commit 7eb29b80dd
3 changed files with 12 additions and 2 deletions

View File

@ -10,8 +10,8 @@ use Psl\Type;
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

View File

@ -85,7 +85,7 @@ abstract class TypeTest extends TestCase
*/
public function testMatches($value): void
{
static::assertTrue($this->getType()->matches($value));
static::assertTrue($this->getType()->matches($value));
}
/**

View File

@ -23,6 +23,11 @@ final class VecTypeTest extends TypeTest
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]
@ -62,6 +67,11 @@ final class VecTypeTest extends TypeTest
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