protected function gatherData(): array
    {
        $data = \array_merge($this->factory->getShared(), $this->data);

        foreach ($data as $key => $value) {
            if ($value instanceof Renderable) {
                $data[$key] = $value->render();
            } elseif ($value instanceof Closure) {
                $data[$key] = $value();
            }
        }

        return $data;
    }
protected function gatherData(): array
    {
        $data = \array_merge($this->factory->getShared(), $this->data);

        foreach ($data as $key => $value) {
            if ($value instanceof Renderable) {
                $data[$key] = $value->render();
            } elseif ($value instanceof Closure) {
                $data[$key] = $value();
            }
        }

        return $data;
    }
protected function gatherData ( ) : array { $ data = \ array_merge ( $ this -> factory -> getShared ( ) , $ this -> data ) ; foreach ( $ data as $ key => $ value ) { if ( $ value instanceof Renderable ) { $ data [ $ key ] = $ value -> render ( ) ; } elseif ( $ value instanceof Closure ) { $ data [ $ key ] = $ value ( ) ; } } return $ data ; }
Get the data bound to the view instance.

@return array
Get the data bound to the view instance .