Completed
Pull Request — master (#23)
by
unknown
03:20
created
app/Http/Controllers/AccountController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
     public function updateProfile(Request $request)
35 35
     {
36 36
         $this->validate($request, [
37
-            'email'     => 'required|email|min:3|unique:users,email,'. $this->id,
37
+            'email'     => 'required|email|min:3|unique:users,email,'.$this->id,
38 38
             'fullname'  => 'required|min:3'
39 39
         ]);
40 40
 
41 41
         $values = $request->all();
42 42
         $this->user->fill($values)->save();
43 43
 
44
-        return redirect()->back()->with('info','Your Profile has been updated successfully');
44
+        return redirect()->back()->with('info', 'Your Profile has been updated successfully');
45 45
     }
46 46
 
47 47
     public function updateAvatar(Request $request)
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
             'file_name'     => 'required|mimes:jpeg,bmp,png|between:1,7000',
51 51
         ]);
52 52
 
53
-        $filename  = $request->file('file_name')->getRealPath();
53
+        $filename = $request->file('file_name')->getRealPath();
54 54
 
55 55
         Cloudder::upload($filename, null);
56 56
         list($width, $height) = getimagesize($filename);
57 57
 
58
-        $fileUrl = Cloudder::show(Cloudder::getPublicId(), ["width" => $width, "height" => $height]);
58
+        $fileUrl = Cloudder::show(Cloudder::getPublicId(), [ "width" => $width, "height" => $height ]);
59 59
 
60
-        $this->user->update(['avatar' => $fileUrl]);
60
+        $this->user->update([ 'avatar' => $fileUrl ]);
61 61
 
62 62
         return redirect()->back()->with('info', 'Your Avatar has been updated Successfully');
63 63
     }
Please login to merge, or discard this patch.
app/Http/Controllers/YahooController.php 1 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/LinkedInController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function __construct()
38 38
     {
39 39
         $this->baseUrl = 'https://api.linkedin.com/v1';
40
-        $this->client = new Client(['base_uri' => $this->baseUrl]);
40
+        $this->client = new Client([ 'base_uri' => $this->baseUrl ]);
41 41
     }
42 42
 
43 43
      /**
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
      */
47 47
     private function setRequestOptions()
48 48
     {
49
-        $authBearer = 'Bearer '. Auth::user()->getAccessToken();
50
-        $this->client = new Client(['base_uri' => $this->baseUrl,
49
+        $authBearer = 'Bearer '.Auth::user()->getAccessToken();
50
+        $this->client = new Client([ 'base_uri' => $this->baseUrl,
51 51
             'headers' => [
52 52
                 'Authorization' => $authBearer,
53 53
                 'Content-Type'  => 'application/json',
54 54
                 'Accept'        => 'application/json'
55
-        ]]);
55
+        ] ]);
56 56
     }
57 57
 
58 58
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     private function setGetResponse($relativeUrl)
63 63
     {
64
-        $this->response = $this->client->get($this->baseUrl . $relativeUrl, []);
64
+        $this->response = $this->client->get($this->baseUrl.$relativeUrl, [ ]);
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/TwitterController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function getPage()
32 32
     {
33
-        if( Session::get('provider') !== 'twitter') {
33
+        if (Session::get('provider') !== 'twitter') {
34 34
             Auth::logout();
35 35
 
36 36
             Session::flush();
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         $searchedTweets = json_decode($this->searchForTweets($this->searchItem), true);
42 42
 
43
-        return view('api.twitter')->withTweets($searchedTweets['statuses']);
43
+        return view('api.twitter')->withTweets($searchedTweets[ 'statuses' ]);
44 44
     }
45 45
 
46 46
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     private function getLatestTweets()
51 51
     {
52
-        return Twitter::getHomeTimeline(['count' => 2, 'format' => 'json']);
52
+        return Twitter::getHomeTimeline([ 'count' => 2, 'format' => 'json' ]);
53 53
     }
54 54
 
55 55
     /**
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     private function searchForTweets($item)
61 61
     {
62
-        return Twitter::getSearch(['q' => $item, 'count' => 4, 'format' => 'json']);
62
+        return Twitter::getSearch([ 'q' => $item, 'count' => 4, 'format' => 'json' ]);
63 63
     }
64 64
 
65 65
     /**
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
             'tweet' => 'required',
74 74
         ]);
75 75
 
76
-        $tweet = $request->input('tweet') . ' #LaravelHackathonStarter';
76
+        $tweet = $request->input('tweet').' #LaravelHackathonStarter';
77 77
 
78
-        Twitter::reconfig(['token' => Auth::user()->getAccessToken(), 'secret' => Auth::user()->getAccessTokenSecret()]);
78
+        Twitter::reconfig([ 'token' => Auth::user()->getAccessToken(), 'secret' => Auth::user()->getAccessTokenSecret() ]);
79 79
 
80
-        Twitter::postTweet(['status' => $tweet, 'format' => 'json']);
80
+        Twitter::postTweet([ 'status' => $tweet, 'format' => 'json' ]);
81 81
 
82 82
         return redirect()->back()->with('info', trans('texts.twitter.success'));
83 83
     }
Please login to merge, or discard this patch.
app/Http/Controllers/SlackController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
      */
27 27
     private function getAllUsersOnYourTeam($count = null)
28 28
     {
29
-        $list = (array)SlackUser::lists();
29
+        $list = (array) SlackUser::lists();
30 30
 
31 31
         if (is_null($count)) {
32
-           return $list['members'];
32
+           return $list[ 'members' ];
33 33
         }
34 34
 
35
-        return array_slice($list['members'], 0, $count);
35
+        return array_slice($list[ 'members' ], 0, $count);
36 36
     }
37 37
 
38 38
     /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             'message'  => 'required'
47 47
         ]);
48 48
 
49
-        $message = $request->input('message') . ' #FromLaravelHackathonStarter :smile:';
49
+        $message = $request->input('message').' #FromLaravelHackathonStarter :smile:';
50 50
 
51 51
         SlackChat::message('#general', $message);
52 52
 
Please login to merge, or discard this patch.
app/Http/Controllers/NytController.php 1 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 = self::API_URL;
31
-         $this->client = new Client(['base_uri' => $this->baseUrl]);
31
+         $this->client = new Client([ 'base_uri' => $this->baseUrl ]);
32 32
          $this->setGetResponse($this->getRelativeUrl());
33 33
     }
34 34
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     private function setGetResponse($relativeUrl)
50 50
     {
51
-        $this->response = $this->client->get($this->baseUrl . $relativeUrl, []);
51
+        $this->response = $this->client->get($this->baseUrl.$relativeUrl, [ ]);
52 52
     }
53 53
 
54 54
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     private function getData()
68 68
     {
69
-        return $this->getResponse()['results']['lists'][0]['books'];
69
+        return $this->getResponse()[ 'results' ][ 'lists' ][ 0 ][ 'books' ];
70 70
     }
71 71
 
72 72
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/FacebookController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function getPage()
19 19
     {
20
-        if(Session::get('provider') !== 'facebook') {
20
+        if (Session::get('provider') !== 'facebook') {
21 21
             Auth::logout();
22 22
 
23 23
             Session::flush();
@@ -38,6 +38,6 @@  discard block
 block discarded – undo
38 38
     {
39 39
        $data = Facebook::get('/me?fields=id,name,cover,email,gender,first_name,last_name,locale,timezone,link,picture', Auth::user()->getAccessToken());
40 40
 
41
-      return json_decode($data->getGraphUser(),true);
41
+      return json_decode($data->getGraphUser(), true);
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/Http/Controllers/TwilioController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         ]);
32 32
 
33 33
         $number = $request->input('number');
34
-        $message = $request->input('message') . ' #LaravelHackathonStarter';
34
+        $message = $request->input('message').' #LaravelHackathonStarter';
35 35
 
36 36
         Twilio::message($number, $message);
37 37
 
Please login to merge, or discard this patch.
app/Http/Controllers/ContactController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $emailToSendTo = $request->input('email');
28 28
         $body = $request->input('message');
29 29
 
30
-        Mail::send('emails.contact', ['body' => $body], function ($message) use ($name,$emailToSendTo) {
30
+        Mail::send('emails.contact', [ 'body' => $body ], function($message) use ($name, $emailToSendTo) {
31 31
             $message->from('[email protected]', "From: {$name}");
32 32
 
33 33
             $message->to($emailToSendTo)->subject(trans('texts.contact.subject'));
Please login to merge, or discard this patch.