From d56366fbfb75f77df0dac9b38a2d8806a9a73b24 Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Tue, 18 Oct 2022 11:45:41 +0200 Subject: [PATCH] Implements __debugInfo() --- src/ArrayClasses/ImmutableArrayClass.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ArrayClasses/ImmutableArrayClass.php b/src/ArrayClasses/ImmutableArrayClass.php index 780d952..27ab345 100644 --- a/src/ArrayClasses/ImmutableArrayClass.php +++ b/src/ArrayClasses/ImmutableArrayClass.php @@ -57,6 +57,18 @@ class ImmutableArrayClass implements IteratorAggregate, JsonSerializable, Serial public function __invoke ($offset) { return $this->get($offset); } + /** + * Set information to dump + * + * @return array The information to dump + * + * @see https://www.php.net/manual/function.var-dump.php + */ + public function __debugInfo (): array { + return [ + 'array' => $this->array, + ]; + } /** * Check if a cell offset exists