Completed
Push — master ( 20dd9c...f5e17e )
by PROSPER
8s
created
app/Http/Controllers/ContactController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
29 29
         $emailToSendTo = $request->input('email');
30 30
         $body = $request->input('message');
31 31
 
32
-        Mail::send('emails.contact', ['body' => $body], function ($message) use ($name,$emailToSendTo) {
32
+        Mail::send('emails.contact', [ 'body' => $body ], function($message) use ($name, $emailToSendTo) {
33 33
             $message->from('[email protected]', "From: {$name}");
34 34
 
35 35
             $message->to($emailToSendTo)->subject("Message From Laravel Hackathon Starter Contact Form");
36 36
         });
37 37
 
38
-        return redirect()->route('contact')->with('info','Your Message has been dispatched successfully');
38
+        return redirect()->route('contact')->with('info', 'Your Message has been dispatched successfully');
39 39
     }
40 40
 
41 41
 }
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function map(Router $router)
39 39
     {
40
-        $router->group(['namespace' => $this->namespace], function ($router) {
40
+        $router->group([ 'namespace' => $this->namespace ], function($router) {
41 41
             require app_path('Http/routes.php');
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
app/Http/Controllers/OauthController.php 3 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@  discard block
 block discarded – undo
26 26
         return $this->execute(($request->has('code') || $request->has('oauth_token')), $provider);
27 27
     }
28 28
 
29
+    /**
30
+     * @param boolean $request
31
+     */
29 32
     public function execute($request, $provider)
30 33
     {
31 34
         if (! $request) {
@@ -41,6 +44,7 @@  discard block
 block discarded – undo
41 44
     /**
42 45
      * Find a user by username or create a new user
43 46
      * @param
47
+     * @param \Laravel\Socialite\Contracts\User $userData
44 48
      * @return
45 49
      */
46 50
     public function findByProviderIdOrCreate($userData, $provider)
@@ -103,7 +107,7 @@  discard block
 block discarded – undo
103 107
     /**
104 108
      * Get Data from Social Media Account
105 109
      * @param  string $provider
106
-     * @return collection
110
+     * @return \Laravel\Socialite\Contracts\User
107 111
      */
108 112
     private function getSocialUser($provider)
109 113
     {
Please login to merge, or discard this patch.
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 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;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function execute($request, $provider)
30 30
     {
31
-        if (! $request) {
31
+        if (!$request) {
32 32
             return $this->getAuthorizationFirst($provider);
33 33
         }
34 34
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         $username = $this->isEmailExists($userData->getNickName()) ? null : $userData->getEmail();
53 53
 
54
-        if (empty($user))  {
54
+        if (empty($user)) {
55 55
             $user = User::create([
56 56
                 'fullname'      => $userData->getName(),
57 57
                 'username'      => $username,
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
 
70 70
     private function isUsernameExists($username = null)
71 71
     {
72
-        $username = User::whereUsername($username)->first()['username'];
72
+        $username = User::whereUsername($username)->first()[ 'username' ];
73 73
 
74
-        return (! is_null($username)) ? true : false;
74
+        return (!is_null($username)) ? true : false;
75 75
     }
76 76
 
77 77
     private function isEmailExists($email = null)
78 78
     {
79
-        $email = User::whereEmail($email)->first()['email'];
79
+        $email = User::whereEmail($email)->first()[ 'email' ];
80 80
 
81
-        return (! is_null($email)) ? true : false;
81
+        return (!is_null($email)) ? true : false;
82 82
     }
83 83
 
84 84
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             'username' => $user->username,
101 101
         ];
102 102
 
103
-        if (! empty(array_diff($dbData, $socialData))) {
103
+        if (!empty(array_diff($dbData, $socialData))) {
104 104
             $user->avatar = $userData->getAvatar();
105 105
             $user->fullname = $userData->getName();
106 106
             $user->username = $userData->getNickName();
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function __construct()
39 39
     {
40
-        $this->middleware('guest', ['except' => 'logout']);
40
+        $this->middleware('guest', [ 'except' => 'logout' ]);
41 41
     }
42 42
 
43 43
     /**
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
     protected function create(array $data)
65 65
     {
66 66
         return User::create([
67
-            'fullname' => $data['name'],
68
-            'email' => $data['email'],
69
-            'password' => bcrypt($data['password']),
67
+            'fullname' => $data[ 'name' ],
68
+            'email' => $data[ 'email' ],
69
+            'password' => bcrypt($data[ 'password' ]),
70 70
         ]);
71 71
     }
72 72
 
Please login to merge, or discard this patch.
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   +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.
app/Http/Controllers/SteamController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
app/Http/Controllers/WebScrapingController.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  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
 
35
-         $relativeUrl = '?q=' . $query . '&format=json';
35
+         $relativeUrl = '?q='.$query.'&format=json';
36 36
          $this->setGetResponse($relativeUrl);
37 37
     }
38 38
 
@@ -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/Controllers/ClockworkController.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 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;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.