. */ declare(strict_types=1); namespace FireflyIII\Support; /** * Class NullArrayObject */ class NullArrayObject extends \ArrayObject { /** @var null|mixed */ public $default; /** * NullArrayObject constructor. * * @param null $default */ /** @phpstan-ignore-next-line */ public function __construct(array $array, $default = null) { parent::__construct($array); $this->default = $default; } /** * @param mixed $key */ public function offsetGet($key): mixed { if ($this->offsetExists($key)) { return parent::offsetGet($key); } return null; } }