src/Generator/Parameter/NonBodyParameterGenerator.php
public function generateQueryParamStatements($parameter, Expr $queryParamVariable)
    {
        $statements = [];

        if (!$parameter->getRequired() || $parameter->getDefault() !== null) {
            $statements[] = new Expr\MethodCall($queryParamVariable, 'setDefault', [
                new Node\Arg(new Scalar\String_($parameter->getName())),
                new Node\Arg($this->getDefaultAsExpr($parameter)),
            ]);
        }

        if ($parameter->getRequired() && $parameter->getDefault() === null) {
            $statements[] = new Expr\MethodCall($queryParamVariable, 'setRequired', [new Node\Arg(new Scalar\String_($parameter->getName()))]);
        }

        return $statements;
    }
public function generateQueryParamStatements($parameter, Expr $queryParamVariable)
    {
        $statements = [];

        if (!$parameter->getRequired() || $parameter->getDefault() !== null) {
            $statements[] = new Expr\MethodCall($queryParamVariable, 'setDefault', [
                new Node\Arg(new Scalar\String_($parameter->getName())),
                new Node\Arg($this->getDefaultAsExpr($parameter)),
            ]);
        }

        if ($parameter->getRequired() && $parameter->getDefault() === null) {
            $statements[] = new Expr\MethodCall($queryParamVariable, 'setRequired', [new Node\Arg(new Scalar\String_($parameter->getName()))]);
        }

        return $statements;
    }
public function generateQueryParamStatements ( $ parameter , Expr $ queryParamVariable ) { $ statements = [ ] ; if ( ! $ parameter -> getRequired ( ) || $ parameter -> getDefault ( ) !== null ) { $ statements [ ] = new Expr \ MethodCall ( $ queryParamVariable , 'setDefault' , [ new Node \ Arg ( new Scalar \ String_ ( $ parameter -> getName ( ) ) ) , new Node \ Arg ( $ this -> getDefaultAsExpr ( $ parameter ) ) , ] ) ; } if ( $ parameter -> getRequired ( ) && $ parameter -> getDefault ( ) === null ) { $ statements [ ] = new Expr \ MethodCall ( $ queryParamVariable , 'setRequired' , [ new Node \ Arg ( new Scalar \ String_ ( $ parameter -> getName ( ) ) ) ] ) ; } return $ statements ; }
{@inheritdoc}

@param $parameter PathParameterSubSchema|HeaderParameterSubSchema|FormDataParameterSubSchema|QueryParameterSubSchema
{ @inheritdoc }