Completed
Push — master ( 413b1b...035779 )
by Mahmoud
05:39 queued 01:09
created

GetUserSocialProfileTask   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 1
1
<?php
2
3
namespace App\Containers\SocialAuthentication\Tasks;
4
5
use App\Containers\SocialAuthentication\Exceptions\MissingTokenException;
6
use Laravel\Socialite\Facades\Socialite;
7
8
/**
9
 * Class GetUserSocialProfileTask.
10
 *
11
 * @author Mahmoud Zalt <[email protected]>
12
 */
13
class GetUserSocialProfileTask
14
{
15
16
    /**
17
     * @param $provider
18
     *
19
     * @return  mixed
20
     */
21
    public function run($provider)
22
    {
23
        // This function will read the `Code` or the `oauth_token` variable from the
24
        // request to make a call and get the user data.
25
        $user = Socialite::driver($provider)->user();
26
27
        return $user;
28
    }
29
30
}
31