Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — development ( 797d7e...e2aa6f )
by José
04:36
created

AuthController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace DoeSangue\Http\Controllers\Auth;
4
5
use DoeSangue\Http\Controllers\Controller;
6
use Illuminate\Support\Facades\Auth;
7
use Socialite;
8
use DoeSangue\User;
9
10
class AuthController extends Controller
11
{
12
13
    public function __construct()
14
    {
15
        //
16
    }
17
18
    public function redirectToProvider($provider)
19
    {
20
        return Socialite::driver($provider)->redirect();
21
    }
22
23
    public function handleProviderCallback($provider)
24
    {
25
        $user = Socialite::driver($provider)->user();
26
27
        // Getting the data from Google+
28
        $data = [
29
        'name' => $user->getName(),
30
        'email' => $user->getEmail(),
31
        'username' => strtolower($user->getName())
32
        ];
33
34
        // Created a user with requested data
35
        Auth::login(User::firstOrCreate($data));
0 ignored issues
show
Bug introduced by
The method firstOrCreate() does not exist on DoeSangue\User. Did you maybe mean create()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
36
37
        // redirect to home
38
        return redirect()->route('home');
39
    }
40
}
41