From a443a538d3ec19f51769839f06fd9904f4c36b26 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 22 Sep 2024 21:57:26 +0200 Subject: [PATCH] fix: update baseline and code style --- phpstan-baseline.neon | 5 +++++ src/TypedIterableAggregate.php | 1 + tests/benchmarks/IteratorBenchmark.php | 2 ++ tests/unit/InterruptableIterableIteratorAggregateTest.php | 2 ++ tests/unit/MapIterableAggregateTest.php | 1 + 5 files changed, 11 insertions(+) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 638ef6d..de5d13d 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,10 @@ parameters: ignoreErrors: + - + message: "#^While loop condition is always true\\.$#" + count: 1 + path: src/InfiniteIteratorAggregate.php + - message: "#^While loop condition is always true\\.$#" count: 1 diff --git a/src/TypedIterableAggregate.php b/src/TypedIterableAggregate.php index 3680e8d..214c475 100644 --- a/src/TypedIterableAggregate.php +++ b/src/TypedIterableAggregate.php @@ -10,6 +10,7 @@ use function gettype; use function is_object; +use function sprintf; /** * @template TKey diff --git a/tests/benchmarks/IteratorBenchmark.php b/tests/benchmarks/IteratorBenchmark.php index 36a1b7a..8337b99 100644 --- a/tests/benchmarks/IteratorBenchmark.php +++ b/tests/benchmarks/IteratorBenchmark.php @@ -13,6 +13,8 @@ use PhpBench\Benchmark\Metadata\Annotations\ParamProviders; use Traversable; +use function sprintf; + abstract class IteratorBenchmark { /** diff --git a/tests/unit/InterruptableIterableIteratorAggregateTest.php b/tests/unit/InterruptableIterableIteratorAggregateTest.php index 069db95..35509df 100644 --- a/tests/unit/InterruptableIterableIteratorAggregateTest.php +++ b/tests/unit/InterruptableIterableIteratorAggregateTest.php @@ -14,6 +14,8 @@ use loophp\iterators\InterruptableIterableIteratorAggregate; use PHPUnit\Framework\TestCase; +use function sprintf; + /** * @internal * diff --git a/tests/unit/MapIterableAggregateTest.php b/tests/unit/MapIterableAggregateTest.php index 128b477..5c454cd 100644 --- a/tests/unit/MapIterableAggregateTest.php +++ b/tests/unit/MapIterableAggregateTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use function gettype; +use function sprintf; /** * @internal