Token   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A read() 0 9 1
A user() 0 9 1
A __construct() 0 3 1
1
<?php
2
3
namespace LeandroFerreiraMa\GoogleCalendar;
4
5
class Token extends GoogleCalendar
6
{
7
    public function __construct(string $token)
8
    {
9
        parent::__construct($token);
10
    }
11
12
    public function read(?array $headers): Token
13
    {
14
        $this->request(
15
            "GET",
16
            "v3/tokeninfo",
17
            null,
18
            $headers
19
        );
20
        return $this;
21
    }
22
23
    public function user(?array $headers): Token
24
    {
25
        $this->request(
26
            "GET",
27
            "v3/userinfo",
28
            null,
29
            $headers
30
        );
31
        return $this;
32
    }
33
}