Code Duplication    Length = 5-6 lines in 2 locations

src/Generation/Builder/MethodBodyBuilder.php 2 locations

@@ 343-348 (lines=6) @@
340
        // request request params using http_build_query if we have a query map
341
        if (null !== $this->queryMap) {
342
            // if we have regular queries, add them to the query builder
343
            if (!empty($this->queries)) {
344
                $queryArray = $this->arrayToString($this->queries);
345
                $this->methodBody->add('$queryString = http_build_query(%s + %s);', $queryArray, $this->queryMap);
346
            } else {
347
                $this->methodBody->add('$queryString = http_build_query(%s);', $this->queryMap);
348
            }
349
350
            $this->methodBody->add('$requestUrl = %s . "%s?" . $queryString;', $baseUrl, $this->uri);
351
@@ 353-357 (lines=5) @@
350
            $this->methodBody->add('$requestUrl = %s . "%s?" . $queryString;', $baseUrl, $this->uri);
351
352
            // if we have queries, add them to the request url
353
        } elseif (!empty($this->queries)) {
354
            $queryArray = $this->arrayToString($this->queries);
355
            $this->methodBody->add('$queryString = http_build_query(%s);', $queryArray);
356
            $this->methodBody->add('$requestUrl = %s . "%s" . "?" . $queryString;', $baseUrl, $this->uri);
357
        } else {
358
            $this->methodBody->add('$requestUrl = %s . "%s";', $baseUrl, $this->uri);
359
        }
360
    }