@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table(config('laravel-oauth.users.table'), function (Blueprint $table) { |
|
16 | + Schema::table(config('laravel-oauth.users.table'), function(Blueprint $table) { |
|
17 | 17 | foreach (config('laravel-oauth.providers') as $provider => $status) { |
18 | 18 | if ($status === true) { |
19 | 19 | $table->string($provider.'_id')->nullable(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function down() |
31 | 31 | { |
32 | - Schema::table(config('laravel-oauth.users.table'), function (Blueprint $table) { |
|
32 | + Schema::table(config('laravel-oauth.users.table'), function(Blueprint $table) { |
|
33 | 33 | foreach (config('laravel-oauth.providers') as $provider => $status) { |
34 | 34 | if (Schema::hasColumn(config('laravel-oauth.users.table'), $provider.'_id')) { |
35 | 35 | $table->dropColumn($provider.'_id'); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $buttons .= "<i class='social-{$provider}'></i>"; |
30 | 30 | } |
31 | 31 | |
32 | - $buttons .= trans("laravel-oauth::word.{$type}", ['provider' => $provider]); |
|
32 | + $buttons .= trans("laravel-oauth::word.{$type}", [ 'provider' => $provider ]); |
|
33 | 33 | $buttons .= '</a>'; |
34 | 34 | } |
35 | 35 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | $provider = strtolower($provider); |
20 | 20 | |
21 | 21 | if ($provider === 'facebook') { |
22 | - return Socialite::driver('facebook')->with(['auth_type' => 'rerequest'])->redirect(); |
|
22 | + return Socialite::driver('facebook')->with([ 'auth_type' => 'rerequest' ])->redirect(); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | return Socialite::driver($provider)->redirect(); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function boot() |
16 | 16 | { |
17 | - Blade::directive('socialite', function ($expression) { |
|
17 | + Blade::directive('socialite', function($expression) { |
|
18 | 18 | // Check user needs :login or :register text |
19 | 19 | return "<?php echo LaravelSocialite::socialiteButtons($expression); ?>"; |
20 | 20 | }); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * {@inheritdoc} |
18 | 18 | */ |
19 | - protected $scopes = ['basic']; |
|
19 | + protected $scopes = [ 'basic' ]; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * {@inheritdoc} |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ]; |
48 | 48 | $signature = $this->generateSignature($endpoint, $query); |
49 | 49 | |
50 | - $query['sig'] = $signature; |
|
50 | + $query[ 'sig' ] = $signature; |
|
51 | 51 | $response = $this->getHttpClient()->get( |
52 | 52 | 'https://api.instagram.com/v1/users/self', [ |
53 | 53 | 'query' => $query, |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ], |
57 | 57 | ]); |
58 | 58 | |
59 | - return json_decode($response->getBody()->getContents(), true)['data']; |
|
59 | + return json_decode($response->getBody()->getContents(), true)[ 'data' ]; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | protected function mapUserToObject(array $user) |
66 | 66 | { |
67 | 67 | return (new User())->setRaw($user)->map([ |
68 | - 'id' => $user['id'], |
|
69 | - 'nickname' => $user['username'], |
|
70 | - 'name' => $user['full_name'], |
|
68 | + 'id' => $user[ 'id' ], |
|
69 | + 'nickname' => $user[ 'username' ], |
|
70 | + 'name' => $user[ 'full_name' ], |
|
71 | 71 | 'email' => null, |
72 | - 'avatar' => $user['profile_picture'], |
|
72 | + 'avatar' => $user[ 'profile_picture' ], |
|
73 | 73 | ]); |
74 | 74 | } |
75 | 75 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $loader->alias('Socialite', \Laravel\Socialite\Facades\Socialite::class); |
58 | 58 | |
59 | 59 | // Register the service the package provides. |
60 | - $this->app->singleton('laravelsocialite', function ($app) { |
|
60 | + $this->app->singleton('laravelsocialite', function($app) { |
|
61 | 61 | return new LaravelSocialite; |
62 | 62 | }); |
63 | 63 | // Create aliase for the package provider |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function provides() |
73 | 73 | { |
74 | - return ['laravelsocialite']; |
|
74 | + return [ 'laravelsocialite' ]; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | private function bootInstagramSocialite() |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | $socialite = $this->app->make(\Laravel\Socialite\Contracts\Factory::class); |
80 | 80 | $socialite->extend( |
81 | 81 | 'instagram', |
82 | - function ($app) use ($socialite) { |
|
83 | - $config = $app['config']['services.instagram']; |
|
82 | + function($app) use ($socialite) { |
|
83 | + $config = $app[ 'config' ][ 'services.instagram' ]; |
|
84 | 84 | |
85 | 85 | return $socialite->buildProvider(InstagramProvider::class, $config); |
86 | 86 | } |