Completed
Push — master ( 397ebb...42d8fc )
by PROSPER
02:30
created
app/Http/Controllers/YahooController.php 3 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use Illuminate\Http\Request;
6
-
7
-use App\Http\Requests;
8 5
 use Goutte\Client;
9 6
 use App\Http\Controllers\Controller;
10 7
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 class YahooController extends Controller
12 12
 {
13
-     /**
14
-     * Instance of Guzzle Client
15
-     * @var object
16
-     */
13
+        /**
14
+         * Instance of Guzzle Client
15
+         * @var object
16
+         */
17 17
     protected $client;
18 18
 
19 19
     /**
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function __construct()
29 29
     {
30
-         $this->baseUrl = 'https://query.yahooapis.com/v1/public/yql';
31
-         $this->client = new Client(['base_uri' => $this->baseUrl]);
30
+            $this->baseUrl = 'https://query.yahooapis.com/v1/public/yql';
31
+            $this->client = new Client(['base_uri' => $this->baseUrl]);
32 32
 
33
-         $query = "SELECT * FROM weather.forecast WHERE (location = 10007)";
33
+            $query = "SELECT * FROM weather.forecast WHERE (location = 10007)";
34 34
 
35
-         $relativeUrl = '?q=' . $query . '&format=json';
36
-         $this->setGetResponse($relativeUrl);
35
+            $relativeUrl = '?q=' . $query . '&format=json';
36
+            $this->setGetResponse($relativeUrl);
37 37
     }
38 38
 
39 39
     /**
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
     }
65 65
 
66 66
 
67
-     /**
68
-     * Return all data to the Yahoo API dashboard
69
-     * @return mixed
70
-     */
67
+        /**
68
+         * Return all data to the Yahoo API dashboard
69
+         * @return mixed
70
+         */
71 71
     public function getPage()
72 72
     {
73 73
         $data = $this->getData();
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 = 'https://query.yahooapis.com/v1/public/yql';
31
-         $this->client = new Client(['base_uri' => $this->baseUrl]);
31
+         $this->client = new Client([ 'base_uri' => $this->baseUrl ]);
32 32
 
33 33
          $query = "SELECT * FROM weather.forecast WHERE (location = 10007)";
34 34
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     private function setGetResponse($relativeUrl)
44 44
     {
45
-        $this->response = $this->client->get($this->baseUrl . $relativeUrl, []);
45
+        $this->response = $this->client->get($this->baseUrl . $relativeUrl, [ ]);
46 46
     }
47 47
 
48 48
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     private function getData()
62 62
     {
63
-        return $this->getResponse()['query']['results']['channel'];
63
+        return $this->getResponse()[ 'query' ][ 'results' ][ 'channel' ];
64 64
     }
65 65
 
66 66
 
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -23,96 +23,96 @@  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::get('/api/steam', [
61 61
         'uses' => 'SteamController@getPage',
62 62
         'as'   => 'api.steam',
63
-        'middleware' => ['auth']
63
+        'middleware' => [ 'auth' ]
64 64
     ]);
65 65
 
66 66
     Route::get('/api/stripe', [
67 67
         'uses' => 'StripeController@getPage',
68 68
         'as'   => 'api.stripe',
69
-        'middleware' => ['auth']
69
+        'middleware' => [ 'auth' ]
70 70
     ]);
71 71
 
72 72
     Route::get('/api/paypal', [
73 73
         'uses' => 'PaypalController@getPage',
74 74
         'as'   => 'api.paypal',
75
-        'middleware' => ['auth']
75
+        'middleware' => [ 'auth' ]
76 76
     ]);
77 77
 
78 78
     Route::get('/api/twilio', [
79 79
         'uses' => 'TwilioController@getPage',
80 80
         'as'   => 'api.twilio',
81
-        'middleware' => ['auth']
81
+        'middleware' => [ 'auth' ]
82 82
     ]);
83 83
 
84 84
     Route::post('/api/twilio', [
85 85
         'uses' => 'TwilioController@sendTextMessage',
86
-        'middleware' => ['auth']
86
+        'middleware' => [ 'auth' ]
87 87
     ]);
88 88
 
89 89
     Route::get('/api/scraping', [
90 90
         'uses' => 'WebScrapingController@getPage',
91 91
         'as'   => 'api.scraping',
92
-        'middleware' => ['auth']
92
+        'middleware' => [ 'auth' ]
93 93
     ]);
94 94
 
95 95
     Route::get('/api/yahoo', [
96 96
         'uses' => 'YahooController@getPage',
97 97
         'as'   => 'api.yahoo',
98
-        'middleware' => ['auth']
98
+        'middleware' => [ 'auth' ]
99 99
     ]);
100 100
 
101 101
     Route::post('/tweet/new', [
102 102
         'uses' => 'TwitterController@sendTweet',
103 103
         'as'   => 'tweet.new',
104
-        'middleware' => ['auth']
104
+        'middleware' => [ 'auth' ]
105 105
     ]);
106 106
 
107 107
     Route::get('/login', [
108 108
         'uses' => 'Auth\AuthController@getLogin',
109 109
         'as'   => 'auth.login',
110
-        'middleware' => ['guest']
110
+        'middleware' => [ 'guest' ]
111 111
     ]);
112 112
 
113 113
     Route::post('/login', [
114 114
         'uses' => 'Auth\AuthController@postLogin',
115
-        'middleware' => ['guest']
115
+        'middleware' => [ 'guest' ]
116 116
     ]);
117 117
 
118 118
     // Password Reset Routes...
@@ -126,50 +126,50 @@  discard block
 block discarded – undo
126 126
     Route::get('/account', [
127 127
         'uses' => 'AccountController@getAccountPage',
128 128
         'as'   => 'account.dashboard',
129
-        'middleware' => ['auth']
129
+        'middleware' => [ 'auth' ]
130 130
     ]);
131 131
 
132 132
     Route::post('/account/profile', [
133 133
         'uses' => 'AccountController@updateProfile',
134 134
         'as'   => 'account.profile',
135
-        'middleware' => ['auth']
135
+        'middleware' => [ 'auth' ]
136 136
     ]);
137 137
 
138 138
     Route::post('/account/photo', [
139 139
         'uses' => 'AccountController@updateAvatar',
140 140
         'as'   => 'account.avatar',
141
-        'middleware' => ['auth']
141
+        'middleware' => [ 'auth' ]
142 142
     ]);
143 143
 
144 144
     Route::post('/account/password', [
145 145
         'uses' => 'AccountController@changePassword',
146 146
         'as'   => 'account.password',
147
-        'middleware' => ['auth']
147
+        'middleware' => [ 'auth' ]
148 148
     ]);
149 149
 
150 150
     Route::post('/account/delete/now', [
151 151
         'uses' => 'AccountController@deleteAccount',
152 152
         'as'   => 'account.delete.now',
153
-        'middleware' => ['auth']
153
+        'middleware' => [ 'auth' ]
154 154
     ]);
155 155
 
156 156
 
157 157
     Route::get('/account/confirm/delete', [
158 158
         'uses' => 'AccountController@redirectToConfirmDeletePage',
159 159
         'as'   => 'account.confirm.delete',
160
-        'middleware' => ['auth']
160
+        'middleware' => [ 'auth' ]
161 161
     ]);
162 162
 
163 163
     Route::get('/account/delete/later', [
164 164
         'uses' => 'AccountController@dontDeleteAccount',
165 165
         'as'   => 'account.dont.delete',
166
-        'middleware' => ['auth']
166
+        'middleware' => [ 'auth' ]
167 167
     ]);
168 168
 
169 169
     Route::get('/signup', [
170 170
         'uses' => 'Auth\AuthController@getRegister',
171 171
         'as'   => 'auth.register',
172
-        'middleware' => ['guest']
172
+        'middleware' => [ 'guest' ]
173 173
     ]);
174 174
 
175 175
     Route::get('logout', [
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
 
180 180
     Route::post('/signup', [
181 181
         'uses' => 'Auth\AuthController@postRegister',
182
-        'middleware' => ['guest']
182
+        'middleware' => [ 'guest' ]
183 183
     ]);
184 184
 
185
-    Route::get('/contact', function () {
185
+    Route::get('/contact', function() {
186 186
         return view('contact');
187 187
     });
188 188
 
Please login to merge, or discard this patch.