@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $loader->alias('Socialite', \Laravel\Socialite\Facades\Socialite::class); |
62 | 62 | |
63 | 63 | // Register the service the package provides. |
64 | - $this->app->singleton('laravelsocialite', function ($app) { |
|
64 | + $this->app->singleton('laravelsocialite', function($app) { |
|
65 | 65 | return new LaravelSocialite; |
66 | 66 | }); |
67 | 67 | // Create aliase for the package provider |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function provides() |
77 | 77 | { |
78 | - return ['laravelsocialite']; |
|
78 | + return [ 'laravelsocialite' ]; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | private function bootInstagramSocialite() |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | $socialite = $this->app->make(\Laravel\Socialite\Contracts\Factory::class); |
84 | 84 | $socialite->extend( |
85 | 85 | 'instagram', |
86 | - function ($app) use ($socialite) { |
|
87 | - $config = $app['config']['services.instagram']; |
|
86 | + function($app) use ($socialite) { |
|
87 | + $config = $app[ 'config' ][ 'services.instagram' ]; |
|
88 | 88 | |
89 | 89 | return $socialite->buildProvider(InstagramProvider::class, $config); |
90 | 90 | } |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | $socialite = $this->app->make(\Laravel\Socialite\Contracts\Factory::class); |
97 | 97 | $socialite->extend( |
98 | 98 | 'dribbble', |
99 | - function ($app) use ($socialite) { |
|
100 | - $config = $app['config']['services.dribbble']; |
|
99 | + function($app) use ($socialite) { |
|
100 | + $config = $app[ 'config' ][ 'services.dribbble' ]; |
|
101 | 101 | |
102 | 102 | return $socialite->buildProvider(DribbbleProvider::class, $config); |
103 | 103 | } |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | $socialite = $this->app->make(\Laravel\Socialite\Contracts\Factory::class); |
110 | 110 | $socialite->extend( |
111 | 111 | 'pinterest', |
112 | - function ($app) use ($socialite) { |
|
113 | - $config = $app['config']['services.pinterest']; |
|
112 | + function($app) use ($socialite) { |
|
113 | + $config = $app[ 'config' ][ 'services.pinterest' ]; |
|
114 | 114 | |
115 | 115 | return $socialite->buildProvider(PinterestProvider::class, $config); |
116 | 116 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /** |
12 | 12 | * {@inheritdoc} |
13 | 13 | */ |
14 | - protected $scopes = ['read_public']; |
|
14 | + protected $scopes = [ 'read_public' ]; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * {@inheritdoc} |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function mapUserToObject(array $user) |
56 | 56 | { |
57 | - preg_match('#https://www.pinterest.com/(.+?)/#', $user['data']['url'], $matches); |
|
58 | - $nickname = $matches[1]; |
|
57 | + preg_match('#https://www.pinterest.com/(.+?)/#', $user[ 'data' ][ 'url' ], $matches); |
|
58 | + $nickname = $matches[ 1 ]; |
|
59 | 59 | return (new User())->setRaw($user)->map( |
60 | 60 | [ |
61 | - 'id' => $user['data']['id'], |
|
61 | + 'id' => $user[ 'data' ][ 'id' ], |
|
62 | 62 | 'nickname' => $nickname, |
63 | - 'name' => $user['data']['first_name'].' '.$user['data']['last_name'], |
|
63 | + 'name' => $user[ 'data' ][ 'first_name' ].' '.$user[ 'data' ][ 'last_name' ], |
|
64 | 64 | ] |
65 | 65 | ); |
66 | 66 | } |