GoogleController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 11
ccs 0
cts 3
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A connectCheckAction() 0 3 1
A connectAction() 0 4 1
1
<?php
2
3
namespace App\Controller;
4
5
use Google_Service_Gmail;
6
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
7
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
8
use Symfony\Component\HttpFoundation\RedirectResponse;
9
use Symfony\Component\Routing\Annotation\Route;
10
11
class GoogleController extends AbstractController
12
{
13
    #[Route("/connect/google", name: "connect_google_start")]
14
    public function connectAction(ClientRegistry $clientRegistry): RedirectResponse
15
    {
16
        return $clientRegistry->getClient('google')->redirect([Google_Service_Gmail::GMAIL_READONLY], []);
17
    }
18
19
    #[Route("/connect/google/check", name: "connect_google_check")]
20
    public function connectCheckAction(): void
21
    {
22
    }
23
}
24