Code Duplication    Length = 8-8 lines in 2 locations

src/Context/WebApiContext.php 2 locations

@@ 104-111 (lines=8) @@
101
    {
102
        $url = $this->prepareUrl($url);
103
104
        if (version_compare(ClientInterface::VERSION, '6.0', '>=')) {
105
            $this->request = new Request($method, $url, $this->headers);
106
        } else {
107
            $this->request = $this->getClient()->createRequest($method, $url);
108
            if (!empty($this->headers)) {
109
                $this->request->addHeaders($this->headers);
110
            }
111
        }
112
113
        $this->sendRequest();
114
    }
@@ 138-145 (lines=8) @@
135
          'body' => json_encode($fields),
136
        );
137
138
        if (version_compare(ClientInterface::VERSION, '6.0', '>=')) {
139
            $this->request = new Request($method, $url, $this->headers, $bodyOption['body']);
140
        } else {
141
            $this->request = $this->getClient()->createRequest($method, $url, $bodyOption);
142
            if (!empty($this->headers)) {
143
                $this->request->addHeaders($this->headers);
144
            }
145
        }
146
147
        $this->sendRequest();
148
    }