src/View.php
public function resolveDataValue($data)
    {
        if ($data instanceof Data) {

            return $this->setData($data);

        } elseif (is_array($data)) {

            return $this->setData(new Data($data));
        }

        throw new \InvalidArgumentException(
            "Data must be View\Data or array value"
        );
    }
public function resolveDataValue($data)
    {
        if ($data instanceof Data) {

            return $this->setData($data);

        } elseif (is_array($data)) {

            return $this->setData(new Data($data));
        }

        throw new \InvalidArgumentException(
            "Data must be View\Data or array value"
        );
    }
public function resolveDataValue ( $ data ) { if ( $ data instanceof Data ) { return $ this -> setData ( $ data ) ; } elseif ( is_array ( $ data ) ) { return $ this -> setData ( new Data ( $ data ) ) ; } throw new \ InvalidArgumentException ( "Data must be View\Data or array value" ) ; }
Resolves value for data

@param  \PHPLegends\View\Data | array $data
@throws \InvalidArgumentException
@return void
Resolves value for data