gossi\codegen\model\parts\ParametersPart::addSimpleDescParameter PHP Méthode

addSimpleDescParameter() public méthode

A quick way to add a parameter with description which is created from the given parameters
public addSimpleDescParameter ( string $name, null | string $type = null, null | string $typeDescription = null, mixed $defaultValue = null )
$name string
$type null | string
$typeDescription null | string
$defaultValue mixed omit the argument to define no default value
    public function addSimpleDescParameter($name, $type = null, $typeDescription = null, $defaultValue = null)
    {
        $parameter = new PhpParameter($name);
        $parameter->setType($type);
        $parameter->setTypeDescription($typeDescription);
        if (3 < func_num_args() == 3) {
            $parameter->setValue($defaultValue);
        }
        $this->addParameter($parameter);
        return $this;
    }