Code Duplication    Length = 11-11 lines in 3 locations

src/Support/Model.php 3 locations

@@ 343-353 (lines=11) @@
340
        return $this->get()->first();
341
    }
342
343
    public function get()
344
    {
345
        if (in_array('get', $this->methods)) {
346
            $this->response = $this->client->get($this->getEndpoint().$this->getQueryString());
347
            if ($this->response->getStatusCode() == '200') {
348
                return $this->collect($this->response->getBody());
349
            } else {
350
                throw new Exception('Status Code '.$this->response->getStatusCode().' - '.$this->response->getReason());
351
            }
352
        }
353
    }
354
355
    public function all()
356
    {
@@ 355-365 (lines=11) @@
352
        }
353
    }
354
355
    public function all()
356
    {
357
        if (in_array('get', $this->methods)) {
358
            $this->response = $this->client->get($this->getEndpoint());
359
            if ($this->response->getStatusCode() == '200') {
360
                return $this->collect($this->response->getBody());
361
            } else {
362
                throw new Exception('Status Code '.$this->response->getStatusCode().' - '.$this->response->getReason());
363
            }
364
        }
365
    }
366
367
    public function find($id)
368
    {
@@ 367-377 (lines=11) @@
364
        }
365
    }
366
367
    public function find($id)
368
    {
369
        if (in_array('get', $this->methods)) {
370
            $this->response = $this->client->get($this->getEndpoint().'/'.$id);
371
            if ($this->response->getStatusCode() == '200') {
372
                return $this->collect($this->response->getBody())->first();
373
            } else {
374
                throw new Exception('Status Code '.$this->response->getStatusCode().' - '.$this->response->getReason());
375
            }
376
        }
377
    }
378
379
    public function delete($id = '')
380
    {