Completed
Push — master ( d672d1...efeb78 )
by PROSPER
06:50
created
app/Http/Controllers/LastFmController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __construct()
24 24
     {
25
-         $this->lastfm = new LastFm(new Browser);
26
-         $this->lastfm->setApiKey(env('LASTFM_API_KEY'));
25
+            $this->lastfm = new LastFm(new Browser);
26
+            $this->lastfm->setApiKey(env('LASTFM_API_KEY'));
27 27
     }
28 28
 
29 29
     /**
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $tracks = array_slice($this->getTopTracks(), 0, 10);
40 40
 
41 41
         return view('api.lastfm')->withDetails($details)
42
-                                 ->withAlbums($albums)
43
-                                 ->withTracks($tracks);
42
+                                    ->withAlbums($albums)
43
+                                    ->withTracks($tracks);
44 44
     }
45 45
 
46 46
     /**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
      */
50 50
     private function getArtistInfo()
51 51
     {
52
-        $result = json_decode($this->lastfm->artist_getInfo(['artist' => 'The Pierces']), true);
52
+        $result = json_decode($this->lastfm->artist_getInfo([ 'artist' => 'The Pierces' ]), true);
53 53
 
54
-        return $result['artist'];
54
+        return $result[ 'artist' ];
55 55
     }
56 56
 
57 57
     /**
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
      */
61 61
     private function getTopAlbums()
62 62
     {
63
-        $result = json_decode($this->lastfm->artist_getTopAlbums(['artist' => 'The Pierces']), true);
63
+        $result = json_decode($this->lastfm->artist_getTopAlbums([ 'artist' => 'The Pierces' ]), true);
64 64
 
65
-        return $result['topalbums']['album'];
65
+        return $result[ 'topalbums' ][ 'album' ];
66 66
     }
67 67
 
68 68
     /**
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
      */
72 72
     private function getTopTracks()
73 73
     {
74
-        $result = json_decode($this->lastfm->artist_getTopTracks(['artist' => 'The Pierces']), true);
74
+        $result = json_decode($this->lastfm->artist_getTopTracks([ 'artist' => 'The Pierces' ]), true);
75 75
 
76
-        return $result['toptracks']['track'];
76
+        return $result[ 'toptracks' ][ 'track' ];
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -23,49 +23,49 @@  discard block
 block discarded – undo
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::post('/tweet/new', [
55 55
         'uses' => 'TwitterController@sendTweet',
56 56
         'as'   => 'tweet.new',
57
-        'middleware' => ['auth']
57
+        'middleware' => [ 'auth' ]
58 58
     ]);
59 59
 
60 60
     Route::get('/login', [
61 61
         'uses' => 'Auth\AuthController@getLogin',
62 62
         'as'   => 'auth.login',
63
-        'middleware' => ['guest']
63
+        'middleware' => [ 'guest' ]
64 64
     ]);
65 65
 
66 66
     Route::post('/login', [
67 67
         'uses' => 'Auth\AuthController@postLogin',
68
-        'middleware' => ['guest']
68
+        'middleware' => [ 'guest' ]
69 69
     ]);
70 70
 
71 71
     // Password Reset Routes...
@@ -79,50 +79,50 @@  discard block
 block discarded – undo
79 79
     Route::get('/account', [
80 80
         'uses' => 'AccountController@getAccountPage',
81 81
         'as'   => 'account.dashboard',
82
-        'middleware' => ['auth']
82
+        'middleware' => [ 'auth' ]
83 83
     ]);
84 84
 
85 85
     Route::post('/account/profile', [
86 86
         'uses' => 'AccountController@updateProfile',
87 87
         'as'   => 'account.profile',
88
-        'middleware' => ['auth']
88
+        'middleware' => [ 'auth' ]
89 89
     ]);
90 90
 
91 91
     Route::post('/account/photo', [
92 92
         'uses' => 'AccountController@updateAvatar',
93 93
         'as'   => 'account.avatar',
94
-        'middleware' => ['auth']
94
+        'middleware' => [ 'auth' ]
95 95
     ]);
96 96
 
97 97
     Route::post('/account/password', [
98 98
         'uses' => 'AccountController@changePassword',
99 99
         'as'   => 'account.password',
100
-        'middleware' => ['auth']
100
+        'middleware' => [ 'auth' ]
101 101
     ]);
102 102
 
103 103
     Route::post('/account/delete/now', [
104 104
         'uses' => 'AccountController@deleteAccount',
105 105
         'as'   => 'account.delete.now',
106
-        'middleware' => ['auth']
106
+        'middleware' => [ 'auth' ]
107 107
     ]);
108 108
 
109 109
 
110 110
     Route::get('/account/confirm/delete', [
111 111
         'uses' => 'AccountController@redirectToConfirmDeletePage',
112 112
         'as'   => 'account.confirm.delete',
113
-        'middleware' => ['auth']
113
+        'middleware' => [ 'auth' ]
114 114
     ]);
115 115
 
116 116
     Route::get('/account/delete/later', [
117 117
         'uses' => 'AccountController@dontDeleteAccount',
118 118
         'as'   => 'account.dont.delete',
119
-        'middleware' => ['auth']
119
+        'middleware' => [ 'auth' ]
120 120
     ]);
121 121
 
122 122
     Route::get('/signup', [
123 123
         'uses' => 'Auth\AuthController@getRegister',
124 124
         'as'   => 'auth.register',
125
-        'middleware' => ['guest']
125
+        'middleware' => [ 'guest' ]
126 126
     ]);
127 127
 
128 128
     Route::get('logout', [
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
 
133 133
     Route::post('/signup', [
134 134
         'uses' => 'Auth\AuthController@postRegister',
135
-        'middleware' => ['guest']
135
+        'middleware' => [ 'guest' ]
136 136
     ]);
137 137
 
138
-    Route::get('/contact', function () {
138
+    Route::get('/contact', function() {
139 139
         return view('contact');
140 140
     });
141 141
 
Please login to merge, or discard this patch.