src/Decorator/Builder.php
protected function setParams($position, $required, $param)
    {
        if (!empty($required['class']) && !is_a($param, $required['class'])) {
            $this->errors[] = sprintf("You can't put an instance of %s in the parameter #%s $%s of type %s",
                get_class($param), $position, $required['name'], $required['class']);
            return false;
        }
        $this->methodParams[$position] = $param;
    }
protected function setParams($position, $required, $param)
    {
        if (!empty($required['class']) && !is_a($param, $required['class'])) {
            $this->errors[] = sprintf("You can't put an instance of %s in the parameter #%s $%s of type %s",
                get_class($param), $position, $required['name'], $required['class']);
            return false;
        }
        $this->methodParams[$position] = $param;
    }
protected function setParams ( $ position , $ required , $ param ) { if ( ! empty ( $ required [ 'class' ] ) && ! is_a ( $ param , $ required [ 'class' ] ) ) { $ this -> errors [ ] = sprintf ( "You can't put an instance of %s in the parameter #%s $%s of type %s" , get_class ( $ param ) , $ position , $ required [ 'name' ] , $ required [ 'class' ] ) ; return false ; } $ this -> methodParams [ $ position ] = $ param ; }
Set into the methodParams array the correct param for the position
@param $position
@param $required
@param $param
@return bool
Set into the methodParams array the correct param for the position