original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Merges provided parameters with those from objects and checks them