public function setRequired($required)
    {
        if (!in_array(
            $required,
            [
                \Parable\Console\Parameter::PARAMETER_REQUIRED,
                \Parable\Console\Parameter::PARAMETER_OPTIONAL,
            ]
        )) {
            throw new \Parable\Console\Exception('Required must be one of the PARAMETER_* constants.');
        }
        $this->required = $required;
        return $this;
    }
public function setRequired($required)
    {
        if (!in_array(
            $required,
            [
                \Parable\Console\Parameter::PARAMETER_REQUIRED,
                \Parable\Console\Parameter::PARAMETER_OPTIONAL,
            ]
        )) {
            throw new \Parable\Console\Exception('Required must be one of the PARAMETER_* constants.');
        }
        $this->required = $required;
        return $this;
    }
public function setRequired ( $ required ) { if ( ! in_array ( $ required , [ \ Parable \ Console \ Parameter :: PARAMETER_REQUIRED , \ Parable \ Console \ Parameter :: PARAMETER_OPTIONAL , ] ) ) { throw new \ Parable \ Console \ Exception ( 'Required must be one of the PARAMETER_* constants.' ) ; } $ this -> required = $ required ; return $ this ; }
Set whether this argument is required.

@param int $required

@return $this
@throws \Parable\Console\Exception
Set whether this argument is required .