@@ -9,10 +9,10 @@ |
||
9 | 9 | |
10 | 10 | class SteamController extends Controller |
11 | 11 | { |
12 | - /** |
|
13 | - * Return all data to the Steam API dashboard |
|
14 | - * @return mixed |
|
15 | - */ |
|
12 | + /** |
|
13 | + * Return all data to the Steam API dashboard |
|
14 | + * @return mixed |
|
15 | + */ |
|
16 | 16 | public function getPage() |
17 | 17 | { |
18 | 18 | return view('api.steam'); |
@@ -36,6 +36,6 @@ |
||
36 | 36 | |
37 | 37 | Twilio::message($number, $message); |
38 | 38 | |
39 | - return redirect()->back()->with('info','Your Message has been sent successfully'); |
|
39 | + return redirect()->back()->with('info', 'Your Message has been sent successfully'); |
|
40 | 40 | } |
41 | 41 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Scrape the Links |
36 | - * @param $siteToCrawl |
|
36 | + * @param string $siteToCrawl |
|
37 | 37 | * @return array |
38 | 38 | */ |
39 | 39 | public function getData($siteToCrawl) |
@@ -2,9 +2,6 @@ |
||
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 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $crawler = $this->client->request('GET', $siteToCrawl); |
42 | 42 | |
43 | 43 | $arr = $crawler->filter('.title a[href^="http"], a[href^="https"]')->each(function($element) { |
44 | - $links = []; |
|
44 | + $links = [ ]; |
|
45 | 45 | |
46 | 46 | array_push($links, $element->text()); |
47 | 47 |
@@ -2,9 +2,6 @@ |
||
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 |
@@ -10,10 +10,10 @@ discard block |
||
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 |
||
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 |
||
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(); |
@@ -28,7 +28,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -3,8 +3,6 @@ |
||
3 | 3 | namespace App\Http\Controllers; |
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | - |
|
7 | -use App\Http\Requests; |
|
8 | 6 | use App\Http\Controllers\Controller; |
9 | 7 | use Illuminate\Contracts\Auth\Guard; |
10 | 8 | use Laravel\Socialite\Contracts\Factory as Socialite; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | /** |
37 | 37 | * Send a Text Message |
38 | 38 | * @param Request $request |
39 | - * @return string |
|
39 | + * @return \Illuminate\Http\RedirectResponse |
|
40 | 40 | */ |
41 | 41 | public function sendTextMessage(Request $request) |
42 | 42 | { |
@@ -36,6 +36,6 @@ |
||
36 | 36 | |
37 | 37 | Twilio::message($number, $message); |
38 | 38 | |
39 | - return redirect()->back()->with('info','Your Message has been sent successfully'); |
|
39 | + return redirect()->back()->with('info', 'Your Message has been sent successfully'); |
|
40 | 40 | } |
41 | 41 | } |
@@ -23,107 +23,107 @@ discard block |
||
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::get('/api/clockwork', [ |
102 | 102 | 'uses' => 'ClockworkController@getPage', |
103 | 103 | 'as' => 'api.clockwork', |
104 | - 'middleware' => ['auth'] |
|
104 | + 'middleware' => [ 'auth' ] |
|
105 | 105 | ]); |
106 | 106 | |
107 | 107 | Route::post('/api/clockwork', [ |
108 | 108 | 'uses' => 'ClockworkController@sendTextMessage', |
109 | - 'middleware' => ['auth'] |
|
109 | + 'middleware' => [ 'auth' ] |
|
110 | 110 | ]); |
111 | 111 | |
112 | 112 | Route::post('/tweet/new', [ |
113 | 113 | 'uses' => 'TwitterController@sendTweet', |
114 | 114 | 'as' => 'tweet.new', |
115 | - 'middleware' => ['auth'] |
|
115 | + 'middleware' => [ 'auth' ] |
|
116 | 116 | ]); |
117 | 117 | |
118 | 118 | Route::get('/login', [ |
119 | 119 | 'uses' => 'Auth\AuthController@getLogin', |
120 | 120 | 'as' => 'auth.login', |
121 | - 'middleware' => ['guest'] |
|
121 | + 'middleware' => [ 'guest' ] |
|
122 | 122 | ]); |
123 | 123 | |
124 | 124 | Route::post('/login', [ |
125 | 125 | 'uses' => 'Auth\AuthController@postLogin', |
126 | - 'middleware' => ['guest'] |
|
126 | + 'middleware' => [ 'guest' ] |
|
127 | 127 | ]); |
128 | 128 | |
129 | 129 | // Password Reset Routes... |
@@ -137,50 +137,50 @@ discard block |
||
137 | 137 | Route::get('/account', [ |
138 | 138 | 'uses' => 'AccountController@getAccountPage', |
139 | 139 | 'as' => 'account.dashboard', |
140 | - 'middleware' => ['auth'] |
|
140 | + 'middleware' => [ 'auth' ] |
|
141 | 141 | ]); |
142 | 142 | |
143 | 143 | Route::post('/account/profile', [ |
144 | 144 | 'uses' => 'AccountController@updateProfile', |
145 | 145 | 'as' => 'account.profile', |
146 | - 'middleware' => ['auth'] |
|
146 | + 'middleware' => [ 'auth' ] |
|
147 | 147 | ]); |
148 | 148 | |
149 | 149 | Route::post('/account/photo', [ |
150 | 150 | 'uses' => 'AccountController@updateAvatar', |
151 | 151 | 'as' => 'account.avatar', |
152 | - 'middleware' => ['auth'] |
|
152 | + 'middleware' => [ 'auth' ] |
|
153 | 153 | ]); |
154 | 154 | |
155 | 155 | Route::post('/account/password', [ |
156 | 156 | 'uses' => 'AccountController@changePassword', |
157 | 157 | 'as' => 'account.password', |
158 | - 'middleware' => ['auth'] |
|
158 | + 'middleware' => [ 'auth' ] |
|
159 | 159 | ]); |
160 | 160 | |
161 | 161 | Route::post('/account/delete/now', [ |
162 | 162 | 'uses' => 'AccountController@deleteAccount', |
163 | 163 | 'as' => 'account.delete.now', |
164 | - 'middleware' => ['auth'] |
|
164 | + 'middleware' => [ 'auth' ] |
|
165 | 165 | ]); |
166 | 166 | |
167 | 167 | |
168 | 168 | Route::get('/account/confirm/delete', [ |
169 | 169 | 'uses' => 'AccountController@redirectToConfirmDeletePage', |
170 | 170 | 'as' => 'account.confirm.delete', |
171 | - 'middleware' => ['auth'] |
|
171 | + 'middleware' => [ 'auth' ] |
|
172 | 172 | ]); |
173 | 173 | |
174 | 174 | Route::get('/account/delete/later', [ |
175 | 175 | 'uses' => 'AccountController@dontDeleteAccount', |
176 | 176 | 'as' => 'account.dont.delete', |
177 | - 'middleware' => ['auth'] |
|
177 | + 'middleware' => [ 'auth' ] |
|
178 | 178 | ]); |
179 | 179 | |
180 | 180 | Route::get('/signup', [ |
181 | 181 | 'uses' => 'Auth\AuthController@getRegister', |
182 | 182 | 'as' => 'auth.register', |
183 | - 'middleware' => ['guest'] |
|
183 | + 'middleware' => [ 'guest' ] |
|
184 | 184 | ]); |
185 | 185 | |
186 | 186 | Route::get('logout', [ |
@@ -190,10 +190,10 @@ discard block |
||
190 | 190 | |
191 | 191 | Route::post('/signup', [ |
192 | 192 | 'uses' => 'Auth\AuthController@postRegister', |
193 | - 'middleware' => ['guest'] |
|
193 | + 'middleware' => [ 'guest' ] |
|
194 | 194 | ]); |
195 | 195 | |
196 | - Route::get('/contact', function () { |
|
196 | + Route::get('/contact', function() { |
|
197 | 197 | return view('contact'); |
198 | 198 | }); |
199 | 199 |