From 2deb40be674347db16aaa6f9e40815c856f25223 Mon Sep 17 00:00:00 2001 From: azjezz Date: Mon, 6 Jul 2020 18:46:58 +0100 Subject: [PATCH] cs fix --- src/Psl/Gen/diff_by_key.php | 4 ++-- tests/Psl/Arr/CountValuesTest.php | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Psl/Gen/diff_by_key.php b/src/Psl/Gen/diff_by_key.php index f46a8b6..bff8fd0 100644 --- a/src/Psl/Gen/diff_by_key.php +++ b/src/Psl/Gen/diff_by_key.php @@ -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 $second */ - $second = ((fn(iterable $iterable): Generator => yield from $iterable)($second)); + $second = ((fn (iterable $iterable): Generator => yield from $iterable)($second)); /** @psalm-var Generator, 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; diff --git a/tests/Psl/Arr/CountValuesTest.php b/tests/Psl/Arr/CountValuesTest.php index 9b92669..fedc871 100644 --- a/tests/Psl/Arr/CountValuesTest.php +++ b/tests/Psl/Arr/CountValuesTest.php @@ -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([]), - ]); - } }