Code Duplication    Length = 11-11 lines in 3 locations

src/Support/Model.php 3 locations

@@ 313-323 (lines=11) @@
310
        return $this->get()->first();
311
    }
312
313
    public function get()
314
    {
315
        if (in_array('get', $this->methods)) {
316
            $this->response = $this->client->get($this->getEndpoint().$this->getQueryString());
317
            if ($this->response->getStatusCode() == '200') {
318
                return $this->collect($this->response->getContents());
319
            } else {
320
                throw new Exception('Status Code '.$this->response->getStatusCode());
321
            }
322
        }
323
    }
324
325
    public function all()
326
    {
@@ 325-335 (lines=11) @@
322
        }
323
    }
324
325
    public function all()
326
    {
327
        if (in_array('get', $this->methods)) {
328
            $this->response = $this->client->get($this->getEndpoint());
329
            if ($this->response->getStatusCode() == '200') {
330
                return $this->collect($this->response->getContents());
331
            } else {
332
                throw new Exception('Status Code '.$this->response->getStatusCode());
333
            }
334
        }
335
    }
336
337
    public function find($id)
338
    {
@@ 337-347 (lines=11) @@
334
        }
335
    }
336
337
    public function find($id)
338
    {
339
        if (in_array('get', $this->methods)) {
340
            $this->response = $this->client->get($this->getEndpoint().'/'.$id);
341
            if ($this->response->getStatusCode() == '200') {
342
                return $this->collect($this->response->getContents())->first();
343
            } else {
344
                throw new Exception('Status Code '.$this->response->getStatusCode());
345
            }
346
        }
347
    }
348
349
    public function delete($id = "")
350
    {