@@ -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,119 +23,119 @@ 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::get('/api/aviary', [ |
| 113 | 113 | 'uses' => 'AviaryController@getPage', |
| 114 | 114 | 'as' => 'api.aviary', |
| 115 | - 'middleware' => ['auth'] |
|
| 115 | + 'middleware' => [ 'auth' ] |
|
| 116 | 116 | ]); |
| 117 | 117 | |
| 118 | 118 | Route::get('/api/lob', [ |
| 119 | 119 | 'uses' => 'LobController@getPage', |
| 120 | 120 | 'as' => 'api.lob', |
| 121 | - 'middleware' => ['auth'] |
|
| 121 | + 'middleware' => [ 'auth' ] |
|
| 122 | 122 | ]); |
| 123 | 123 | |
| 124 | 124 | Route::post('/tweet/new', [ |
| 125 | 125 | 'uses' => 'TwitterController@sendTweet', |
| 126 | 126 | 'as' => 'tweet.new', |
| 127 | - 'middleware' => ['auth'] |
|
| 127 | + 'middleware' => [ 'auth' ] |
|
| 128 | 128 | ]); |
| 129 | 129 | |
| 130 | 130 | Route::get('/login', [ |
| 131 | 131 | 'uses' => 'Auth\AuthController@getLogin', |
| 132 | 132 | 'as' => 'auth.login', |
| 133 | - 'middleware' => ['guest'] |
|
| 133 | + 'middleware' => [ 'guest' ] |
|
| 134 | 134 | ]); |
| 135 | 135 | |
| 136 | 136 | Route::post('/login', [ |
| 137 | 137 | 'uses' => 'Auth\AuthController@postLogin', |
| 138 | - 'middleware' => ['guest'] |
|
| 138 | + 'middleware' => [ 'guest' ] |
|
| 139 | 139 | ]); |
| 140 | 140 | |
| 141 | 141 | // Password Reset Routes... |
@@ -149,50 +149,50 @@ discard block |
||
| 149 | 149 | Route::get('/account', [ |
| 150 | 150 | 'uses' => 'AccountController@getAccountPage', |
| 151 | 151 | 'as' => 'account.dashboard', |
| 152 | - 'middleware' => ['auth'] |
|
| 152 | + 'middleware' => [ 'auth' ] |
|
| 153 | 153 | ]); |
| 154 | 154 | |
| 155 | 155 | Route::post('/account/profile', [ |
| 156 | 156 | 'uses' => 'AccountController@updateProfile', |
| 157 | 157 | 'as' => 'account.profile', |
| 158 | - 'middleware' => ['auth'] |
|
| 158 | + 'middleware' => [ 'auth' ] |
|
| 159 | 159 | ]); |
| 160 | 160 | |
| 161 | 161 | Route::post('/account/photo', [ |
| 162 | 162 | 'uses' => 'AccountController@updateAvatar', |
| 163 | 163 | 'as' => 'account.avatar', |
| 164 | - 'middleware' => ['auth'] |
|
| 164 | + 'middleware' => [ 'auth' ] |
|
| 165 | 165 | ]); |
| 166 | 166 | |
| 167 | 167 | Route::post('/account/password', [ |
| 168 | 168 | 'uses' => 'AccountController@changePassword', |
| 169 | 169 | 'as' => 'account.password', |
| 170 | - 'middleware' => ['auth'] |
|
| 170 | + 'middleware' => [ 'auth' ] |
|
| 171 | 171 | ]); |
| 172 | 172 | |
| 173 | 173 | Route::post('/account/delete/now', [ |
| 174 | 174 | 'uses' => 'AccountController@deleteAccount', |
| 175 | 175 | 'as' => 'account.delete.now', |
| 176 | - 'middleware' => ['auth'] |
|
| 176 | + 'middleware' => [ 'auth' ] |
|
| 177 | 177 | ]); |
| 178 | 178 | |
| 179 | 179 | |
| 180 | 180 | Route::get('/account/confirm/delete', [ |
| 181 | 181 | 'uses' => 'AccountController@redirectToConfirmDeletePage', |
| 182 | 182 | 'as' => 'account.confirm.delete', |
| 183 | - 'middleware' => ['auth'] |
|
| 183 | + 'middleware' => [ 'auth' ] |
|
| 184 | 184 | ]); |
| 185 | 185 | |
| 186 | 186 | Route::get('/account/delete/later', [ |
| 187 | 187 | 'uses' => 'AccountController@dontDeleteAccount', |
| 188 | 188 | 'as' => 'account.dont.delete', |
| 189 | - 'middleware' => ['auth'] |
|
| 189 | + 'middleware' => [ 'auth' ] |
|
| 190 | 190 | ]); |
| 191 | 191 | |
| 192 | 192 | Route::get('/signup', [ |
| 193 | 193 | 'uses' => 'Auth\AuthController@getRegister', |
| 194 | 194 | 'as' => 'auth.register', |
| 195 | - 'middleware' => ['guest'] |
|
| 195 | + 'middleware' => [ 'guest' ] |
|
| 196 | 196 | ]); |
| 197 | 197 | |
| 198 | 198 | Route::get('logout', [ |
@@ -202,10 +202,10 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | Route::post('/signup', [ |
| 204 | 204 | 'uses' => 'Auth\AuthController@postRegister', |
| 205 | - 'middleware' => ['guest'] |
|
| 205 | + 'middleware' => [ 'guest' ] |
|
| 206 | 206 | ]); |
| 207 | 207 | |
| 208 | - Route::get('/contact', function () { |
|
| 208 | + Route::get('/contact', function() { |
|
| 209 | 209 | return view('contact'); |
| 210 | 210 | }); |
| 211 | 211 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Get all delivery routes for this zip code |
| 36 | - * @param string $zipcdode |
|
| 36 | + * @param string $zipcode |
|
| 37 | 37 | * @return array |
| 38 | 38 | */ |
| 39 | 39 | private function getRoutes($zipcode) |
@@ -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 | |
@@ -38,9 +38,9 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | private function getRoutes($zipcode) |
| 40 | 40 | { |
| 41 | - $results = $this->lob->routes()->all(['zip_codes' => $zipcode]); |
|
| 41 | + $results = $this->lob->routes()->all([ 'zip_codes' => $zipcode ]); |
|
| 42 | 42 | |
| 43 | - return $results[0]['routes']; |
|
| 43 | + return $results[ 0 ][ 'routes' ]; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |