Controller   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A authenticateAll() 0 6 1
1
<?php
2
3
namespace App\Containers\SocialAuth\UI\API\Controllers;
4
5
use App\Containers\SocialAuth\Actions\SocialLoginAction;
6
use App\Containers\SocialAuth\UI\API\Requests\ApiAuthenticateRequest;
7
use App\Containers\User\UI\API\Transformers\UserTransformer;
8
use App\Ship\Parents\Controllers\ApiController;
9
10
/**
11
 * Class Controller.
12
 *
13
 * @author Mahmoud Zalt <[email protected]>
14
 */
15
class Controller extends ApiController
16
{
17
18
    /**
19
     * @param \App\Containers\SocialAuth\UI\API\Requests\ApiAuthenticateRequest $request
20
     * @param \App\Containers\SocialAuth\Actions\SocialLoginAction              $action
21
     * @param                                                                   $provider
22
     *
23
     * @return  \Dingo\Api\Http\Response
24
     */
25
    public function authenticateAll(ApiAuthenticateRequest $request, SocialLoginAction $action, $provider)
26
    {
27
        $user = $action->run($provider, $request->all());
28
29
        return $this->response->item($user, new UserTransformer());
30
    }
31
32
}
33