protected function checkParameters($parameters, $requirements = true)
    {
        if (is_array($parameters)) {
            $parameters = array_replace($this->getParameters(), $parameters);
        }
        $obstacles = $this->collectRenderingObstacles($parameters, $requirements);
        if ($obstacles) {
            throw new WidgetInvalidRenderingParametersException(reset($obstacles));
        }
        return $parameters;
    }
protected function checkParameters($parameters, $requirements = true)
    {
        if (is_array($parameters)) {
            $parameters = array_replace($this->getParameters(), $parameters);
        }
        $obstacles = $this->collectRenderingObstacles($parameters, $requirements);
        if ($obstacles) {
            throw new WidgetInvalidRenderingParametersException(reset($obstacles));
        }
        return $parameters;
    }
protected function checkParameters ( $ parameters , $ requirements = true ) { if ( is_array ( $ parameters ) ) { $ parameters = array_replace ( $ this -> getParameters ( ) , $ parameters ) ; } $ obstacles = $ this -> collectRenderingObstacles ( $ parameters , $ requirements ) ; if ( $ obstacles ) { throw new WidgetInvalidRenderingParametersException ( reset ( $ obstacles ) ) ; } return $ parameters ; }
Merges provided parameters with those from objects and checks them

@param array $parameters
@param bool|array $requirements - required parameter names or true for getting them from getRequiredParameters()
@return array
@throws \Subscribo\Omnipay\Shared\Exception\WidgetInvalidRenderingParametersException
Merges provided parameters with those from objects and checks them