Completed
Push — master ( 20dd9c...f5e17e )
by PROSPER
8s
created
app/Http/Controllers/NytController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
     public function __construct()
29 29
     {
30 30
          $this->baseUrl = 'http://api.nytimes.com/svc';
31
-         $this->client = new Client(['base_uri' => $this->baseUrl]);
31
+         $this->client = new Client([ 'base_uri' => $this->baseUrl ]);
32 32
 
33
-         $relativeUrl = '/books/v3/lists/overview.json?api-key=' . env('NYT_BOOKS_API_KEY');
33
+         $relativeUrl = '/books/v3/lists/overview.json?api-key='.env('NYT_BOOKS_API_KEY');
34 34
          $this->setGetResponse($relativeUrl);
35 35
     }
36 36
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     private function setGetResponse($relativeUrl)
42 42
     {
43
-        $this->response = $this->client->get($this->baseUrl . $relativeUrl, []);
43
+        $this->response = $this->client->get($this->baseUrl.$relativeUrl, [ ]);
44 44
     }
45 45
 
46 46
     /**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     private function getData()
60 60
     {
61
-        return $this->getResponse()['results']['lists'][0]['books'];
61
+        return $this->getResponse()[ 'results' ][ 'lists' ][ 0 ][ 'books' ];
62 62
     }
63 63
 
64 64
     /**
Please login to merge, or discard this patch.