src/Generator/InputGeneratorTrait.php
protected function createQueryParamStatements(Operation $operation)
    {
        $queryParamDocumentation = [];
        $queryParamVariable = new Expr\Variable('queryParam');
        $queryParamStatements = [
            new Expr\Assign($queryParamVariable, new Expr\New_(new Name('QueryParam')))
        ];

        if ($operation->getOperation()->getParameters()) {
            foreach ($operation->getOperation()->getParameters() as $parameter) {
                if ($parameter instanceof Reference) {
                    $parameter = $this->resolveParameter($parameter);
                }

                if ($parameter instanceof FormDataParameterSubSchema) {
                    $queryParamStatements = array_merge($queryParamStatements, $this->formDataParameterGenerator->generateQueryParamStatements($parameter, $queryParamVariable));
                    $queryParamDocumentation[] = $this->formDataParameterGenerator->generateQueryDocParameter($parameter);
                }

                if ($parameter instanceof HeaderParameterSubSchema) {
                    $queryParamStatements = array_merge($queryParamStatements, $this->headerParameterGenerator->generateQueryParamStatements($parameter, $queryParamVariable));
                    $queryParamDocumentation[] = $this->headerParameterGenerator->generateQueryDocParameter($parameter);
                }

                if ($parameter instanceof QueryParameterSubSchema) {
                    $queryParamStatements = array_merge($queryParamStatements, $this->queryParameterGenerator->generateQueryParamStatements($parameter, $queryParamVariable));
                    $queryParamDocumentation[] = $this->queryParameterGenerator->generateQueryDocParameter($parameter);
                }
            }
        }

        return [$queryParamDocumentation, $queryParamStatements, $queryParamVariable];
    }
protected function createQueryParamStatements(Operation $operation)
    {
        $queryParamDocumentation = [];
        $queryParamVariable = new Expr\Variable('queryParam');
        $queryParamStatements = [
            new Expr\Assign($queryParamVariable, new Expr\New_(new Name('QueryParam')))
        ];

        if ($operation->getOperation()->getParameters()) {
            foreach ($operation->getOperation()->getParameters() as $parameter) {
                if ($parameter instanceof Reference) {
                    $parameter = $this->resolveParameter($parameter);
                }

                if ($parameter instanceof FormDataParameterSubSchema) {
                    $queryParamStatements = array_merge($queryParamStatements, $this->formDataParameterGenerator->generateQueryParamStatements($parameter, $queryParamVariable));
                    $queryParamDocumentation[] = $this->formDataParameterGenerator->generateQueryDocParameter($parameter);
                }

                if ($parameter instanceof HeaderParameterSubSchema) {
                    $queryParamStatements = array_merge($queryParamStatements, $this->headerParameterGenerator->generateQueryParamStatements($parameter, $queryParamVariable));
                    $queryParamDocumentation[] = $this->headerParameterGenerator->generateQueryDocParameter($parameter);
                }

                if ($parameter instanceof QueryParameterSubSchema) {
                    $queryParamStatements = array_merge($queryParamStatements, $this->queryParameterGenerator->generateQueryParamStatements($parameter, $queryParamVariable));
                    $queryParamDocumentation[] = $this->queryParameterGenerator->generateQueryDocParameter($parameter);
                }
            }
        }

        return [$queryParamDocumentation, $queryParamStatements, $queryParamVariable];
    }
Create the query param statements and documentation

@param Operation $operation

@return array