Completed
Pull Request — master (#22)
by
unknown
05:32
created
app/Http/Controllers/TwitterController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function getPage()
33 33
     {
34
-        if( Session::get('provider') !== 'twitter') {
34
+        if (Session::get('provider') !== 'twitter') {
35 35
             Auth::logout();
36 36
 
37 37
             Session::flush();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $searchedTweets = json_decode($this->searchForTweets($this->searchItem), true);
43 43
 
44
-        return view('api.twitter')->withTweets($searchedTweets['statuses']);
44
+        return view('api.twitter')->withTweets($searchedTweets[ 'statuses' ]);
45 45
     }
46 46
 
47 47
     /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     private function getLatestTweets()
52 52
     {
53
-        return Twitter::getHomeTimeline(['count' => 2, 'format' => 'json']);
53
+        return Twitter::getHomeTimeline([ 'count' => 2, 'format' => 'json' ]);
54 54
     }
55 55
 
56 56
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     private function searchForTweets($item)
62 62
     {
63
-        return Twitter::getSearch(['q' => $item, 'count' => 4, 'format' => 'json']);
63
+        return Twitter::getSearch([ 'q' => $item, 'count' => 4, 'format' => 'json' ]);
64 64
     }
65 65
 
66 66
     /**
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
             'tweet' => 'required',
75 75
         ]);
76 76
 
77
-        $tweet = $request->input('tweet') . ' #LaravelHackathonStarter';
77
+        $tweet = $request->input('tweet').' #LaravelHackathonStarter';
78 78
 
79
-        Twitter::reconfig(['token' => Auth::user()->getAccessToken(), 'secret' => Auth::user()->getAccessTokenSecret()]);
79
+        Twitter::reconfig([ 'token' => Auth::user()->getAccessToken(), 'secret' => Auth::user()->getAccessTokenSecret() ]);
80 80
 
81
-        Twitter::postTweet(['status' => $tweet, 'format' => 'json']);
81
+        Twitter::postTweet([ 'status' => $tweet, 'format' => 'json' ]);
82 82
 
83
-        return redirect()->back()->with('info','Your Tweet has been posted successfully');
83
+        return redirect()->back()->with('info', 'Your Tweet has been posted successfully');
84 84
     }
85 85
 }
Please login to merge, or discard this patch.
app/Http/Controllers/TwilioController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
         ]);
33 33
 
34 34
         $number = $request->input('number');
35
-        $message = $request->input('message') . ' #LaravelHackathonStarter';
35
+        $message = $request->input('message').' #LaravelHackathonStarter';
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.