public function toArray()
    {
        $collection = [];

        $this->recursive(
            $this->storage,
            function ($value, $key) use (& $collection) {
                if (is_object($value)) {
                    $collection[$key] = (array) $value;
                } else {
                    $collection[$key] = $value;
                }
            }
        );

        return $collection;
    }