From 9ac8863a403f0bdaffb25eb107f442b2c2ba950c Mon Sep 17 00:00:00 2001 From: "A. B. M. Mahmudul Hasan" Date: Thu, 30 Jul 2026 15:59:58 +0600 Subject: [PATCH] fixing declaration --- src/DI/Attribute/Infuse.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DI/Attribute/Infuse.php b/src/DI/Attribute/Infuse.php index 8e6ae85..1c790e8 100644 --- a/src/DI/Attribute/Infuse.php +++ b/src/DI/Attribute/Infuse.php @@ -25,7 +25,7 @@ class Infuse { /** @var array */ - private array $data = []; + private array $data; private string|int|null $firstKey = null; @@ -37,6 +37,8 @@ class Infuse */ public function __construct(mixed ...$parameters) { + $this->data = []; + if ($parameters !== []) { $this->firstKey = array_key_first($parameters); foreach ($parameters as $key => $value) {