gossi\codegen\model\parts\ParametersPart::addSimpleParameter PHP Method

addSimpleParameter() public method

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