This commit is contained in:
azjezz 2020-07-06 18:46:58 +01:00
parent 695cb4947c
commit 2deb40be67
2 changed files with 2 additions and 12 deletions

View File

@ -31,9 +31,9 @@ function diff_by_key(iterable $first, iterable $second, iterable ...$rest): Gene
// We don't use arrays here to ensure we allow the usage of non-arraykey indexs.
/** @psalm-var Generator<Tk, mixed, mixed, void> $second */
$second = ((fn(iterable $iterable): Generator => yield from $iterable)($second));
$second = ((fn (iterable $iterable): Generator => yield from $iterable)($second));
/** @psalm-var Generator<iterable<Tk, mixed>, mixed, mixed, void> $generator */
$generator = ((static function(Generator $second, iterable ...$rest): Generator {
$generator = ((static function (Generator $second, iterable ...$rest): Generator {
yield from $second;
foreach ($rest as $iterable) {
yield from $iterable;

View File

@ -56,14 +56,4 @@ class CountValuesTest extends TestCase
],
];
}
public function testCountThrowsForNonArrayKeyValues(): void
{
$this->expectException(Exception\InvariantViolationException::class);
$this->expectExceptionMessage('Expected all values to be of type array-key, value of type (object) provided.');
Arr\count_values([
new Collection\Map([]),
]);
}
}