@@ -30,7 +30,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -26,13 +26,13 @@ discard block |
||
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 |
||
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 |
@@ -28,7 +28,7 @@ discard block |
||
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 |
||
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 |
||
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 | /** |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 | } |
@@ -31,7 +31,7 @@ |
||
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 |
@@ -27,7 +27,7 @@ |
||
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')); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | /** |
11 | 11 | * @var array |
12 | 12 | */ |
13 | - protected $sampleArtist = ['artist' => 'The Pierces']; |
|
13 | + protected $sampleArtist = [ 'artist' => 'The Pierces' ]; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * LastFm Object |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | */ |
50 | 50 | private function getArtistInfo() |
51 | 51 | { |
52 | - $result = (array)$this->lastfm->artist_getInfo($this->sampleArtist); |
|
52 | + $result = (array) $this->lastfm->artist_getInfo($this->sampleArtist); |
|
53 | 53 | |
54 | - return $result['artist']; |
|
54 | + return $result[ 'artist' ]; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | */ |
61 | 61 | private function getTopAlbums() |
62 | 62 | { |
63 | - $result = (array)$this->lastfm->artist_getTopAlbums($this->sampleArtist); |
|
63 | + $result = (array) $this->lastfm->artist_getTopAlbums($this->sampleArtist); |
|
64 | 64 | |
65 | - return $result['topalbums']->album; |
|
65 | + return $result[ 'topalbums' ]->album; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | */ |
72 | 72 | private function getTopTracks() |
73 | 73 | { |
74 | - $result = (array)$this->lastfm->artist_getTopTracks($this->sampleArtist); |
|
74 | + $result = (array) $this->lastfm->artist_getTopTracks($this->sampleArtist); |
|
75 | 75 | |
76 | - return $result['toptracks']->track; |
|
76 | + return $result[ 'toptracks' ]->track; |
|
77 | 77 | } |
78 | 78 | } |