From 9004d98701a2a2d39c2222d9e6b31cd45f4f8861 Mon Sep 17 00:00:00 2001 From: Tomasz Hanc <7013293+tomaszhanc@users.noreply.github.com> Date: Wed, 9 Feb 2022 23:12:39 +0100 Subject: [PATCH] Fix PHPStan --- src/Flow/ETL/Rows.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Flow/ETL/Rows.php b/src/Flow/ETL/Rows.php index fcfa917e0..a93c5b00b 100644 --- a/src/Flow/ETL/Rows.php +++ b/src/Flow/ETL/Rows.php @@ -319,6 +319,10 @@ public function count() : int */ public function chunks(int $size) : array { + if ($size < 1) { + throw InvalidArgumentException::because('Chunk size must be greater than 0'); + } + $chunks = []; foreach (\array_chunk($this->rows, $size) as $chunk) {