Completed
Push — master ( efeb78...e97d02 )
by PROSPER
03:45
created
app/Http/Controllers/NytController.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use GuzzleHttp\Client;
6
-use App\Http\Requests;
7
-use Illuminate\Http\Request;
8 6
 use App\Http\Controllers\Controller;
9 7
 
10 8
 class NytController extends Controller
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
      */
28 28
     public function __construct()
29 29
     {
30
-         $this->baseUrl = 'http://api.nytimes.com/svc';
31
-         $this->client = new Client(['base_uri' => $this->baseUrl]);
30
+            $this->baseUrl = 'http://api.nytimes.com/svc';
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');
34
-         $this->setGetResponse($relativeUrl);
33
+            $relativeUrl = '/books/v3/lists/overview.json?api-key=' . env('NYT_BOOKS_API_KEY');
34
+            $this->setGetResponse($relativeUrl);
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  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 33
          $relativeUrl = '/books/v3/lists/overview.json?api-key=' . env('NYT_BOOKS_API_KEY');
34 34
          $this->setGetResponse($relativeUrl);
@@ -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.
app/Http/routes.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,55 +23,55 @@  discard block
 block discarded – undo
23 23
 |
24 24
 */
25 25
 
26
-Route::group(['middleware' => ['web']], function () {
26
+Route::group([ 'middleware' => [ 'web' ] ], function() {
27 27
 
28
-    Route::get('/', function () {
28
+    Route::get('/', function() {
29 29
         return view('welcome');
30 30
     });
31 31
 
32
-    Route::get('/api', function () {
32
+    Route::get('/api', function() {
33 33
         return view('apidashboard');
34 34
     });
35 35
 
36 36
     Route::get('/api/github', [
37 37
         'uses' => 'GithubController@getPage',
38 38
         'as'   => 'api.github',
39
-        'middleware' => ['auth']
39
+        'middleware' => [ 'auth' ]
40 40
     ]);
41 41
 
42 42
     Route::get('/api/twitter', [
43 43
         'uses' => 'TwitterController@getPage',
44 44
         'as'   => 'api.twitter',
45
-        'middleware' => ['auth']
45
+        'middleware' => [ 'auth' ]
46 46
     ]);
47 47
 
48 48
     Route::get('/api/lastfm', [
49 49
         'uses' => 'LastFmController@getPage',
50 50
         'as'   => 'api.lastfm',
51
-        'middleware' => ['auth']
51
+        'middleware' => [ 'auth' ]
52 52
     ]);
53 53
 
54 54
     Route::get('/api/nyt', [
55 55
         'uses' => 'NytController@getPage',
56 56
         'as'   => 'api.nyt',
57
-        'middleware' => ['auth']
57
+        'middleware' => [ 'auth' ]
58 58
     ]);
59 59
 
60 60
     Route::post('/tweet/new', [
61 61
         'uses' => 'TwitterController@sendTweet',
62 62
         'as'   => 'tweet.new',
63
-        'middleware' => ['auth']
63
+        'middleware' => [ 'auth' ]
64 64
     ]);
65 65
 
66 66
     Route::get('/login', [
67 67
         'uses' => 'Auth\AuthController@getLogin',
68 68
         'as'   => 'auth.login',
69
-        'middleware' => ['guest']
69
+        'middleware' => [ 'guest' ]
70 70
     ]);
71 71
 
72 72
     Route::post('/login', [
73 73
         'uses' => 'Auth\AuthController@postLogin',
74
-        'middleware' => ['guest']
74
+        'middleware' => [ 'guest' ]
75 75
     ]);
76 76
 
77 77
     // Password Reset Routes...
@@ -85,50 +85,50 @@  discard block
 block discarded – undo
85 85
     Route::get('/account', [
86 86
         'uses' => 'AccountController@getAccountPage',
87 87
         'as'   => 'account.dashboard',
88
-        'middleware' => ['auth']
88
+        'middleware' => [ 'auth' ]
89 89
     ]);
90 90
 
91 91
     Route::post('/account/profile', [
92 92
         'uses' => 'AccountController@updateProfile',
93 93
         'as'   => 'account.profile',
94
-        'middleware' => ['auth']
94
+        'middleware' => [ 'auth' ]
95 95
     ]);
96 96
 
97 97
     Route::post('/account/photo', [
98 98
         'uses' => 'AccountController@updateAvatar',
99 99
         'as'   => 'account.avatar',
100
-        'middleware' => ['auth']
100
+        'middleware' => [ 'auth' ]
101 101
     ]);
102 102
 
103 103
     Route::post('/account/password', [
104 104
         'uses' => 'AccountController@changePassword',
105 105
         'as'   => 'account.password',
106
-        'middleware' => ['auth']
106
+        'middleware' => [ 'auth' ]
107 107
     ]);
108 108
 
109 109
     Route::post('/account/delete/now', [
110 110
         'uses' => 'AccountController@deleteAccount',
111 111
         'as'   => 'account.delete.now',
112
-        'middleware' => ['auth']
112
+        'middleware' => [ 'auth' ]
113 113
     ]);
114 114
 
115 115
 
116 116
     Route::get('/account/confirm/delete', [
117 117
         'uses' => 'AccountController@redirectToConfirmDeletePage',
118 118
         'as'   => 'account.confirm.delete',
119
-        'middleware' => ['auth']
119
+        'middleware' => [ 'auth' ]
120 120
     ]);
121 121
 
122 122
     Route::get('/account/delete/later', [
123 123
         'uses' => 'AccountController@dontDeleteAccount',
124 124
         'as'   => 'account.dont.delete',
125
-        'middleware' => ['auth']
125
+        'middleware' => [ 'auth' ]
126 126
     ]);
127 127
 
128 128
     Route::get('/signup', [
129 129
         'uses' => 'Auth\AuthController@getRegister',
130 130
         'as'   => 'auth.register',
131
-        'middleware' => ['guest']
131
+        'middleware' => [ 'guest' ]
132 132
     ]);
133 133
 
134 134
     Route::get('logout', [
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
 
139 139
     Route::post('/signup', [
140 140
         'uses' => 'Auth\AuthController@postRegister',
141
-        'middleware' => ['guest']
141
+        'middleware' => [ 'guest' ]
142 142
     ]);
143 143
 
144
-    Route::get('/contact', function () {
144
+    Route::get('/contact', function() {
145 145
         return view('contact');
146 146
     });
147 147
 
Please login to merge, or discard this patch.