GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#9)
by Lukáš
03:14
created

RefreshTokenEntity   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 111
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A __clone() 0 4 1
A isRevoked() 0 4 1
A setRevoked() 0 4 1
A getIdentifier() 0 4 1
A setIdentifier() 0 4 1
A getExpiryDateTime() 0 4 1
A setExpiryDateTime() 0 4 1
A setAccessToken() 0 4 1
A getAccessToken() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Lookyman\NetteOAuth2Server\Storage\Doctrine\RefreshToken;
5
6
use Doctrine\ORM\Mapping as ORM;
7
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
8
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
9
10
/**
11
 * @ORM\Entity()
12
 * @ORM\Table(name="refresh_token")
13
 */
14
class RefreshTokenEntity implements RefreshTokenEntityInterface
15
{
16
	/**
17
	 * @ORM\Id()
18
	 * @ORM\GeneratedValue()
19
	 * @ORM\Column(type="integer")
20
	 * @var int
21
	 */
22
	private $id;
23
24
	/**
25
	 * @ORM\Column(type="boolean")
26
	 * @var bool
27
	 */
28
	private $revoked = false;
29
30
	/**
31
	 * @ORM\Column(type="string", length=80, unique=true)
32
	 * @var string
33
	 */
34
	private $identifier;
35
36
	/**
37
	 * @ORM\Column(type="datetimetz")
38
	 * @var \DateTime
39
	 */
40
	private $expiryDateTime;
41
42
	/**
43
	 * @ORM\ManyToOne(targetEntity="Lookyman\NetteOAuth2Server\Storage\Doctrine\AccessToken\AccessTokenEntity")
44
	 * @var AccessToken;
45
	 */
46
	private $accessToken;
47
48
	/**
49
	 * @return int|null
50
	 */
51
	public function getId()
52
	{
53
		return $this->id;
54
	}
55
56
	public function __clone()
57
	{
58
		$this->id = null;
59
	}
60
61
	/**
62
	 * @return bool
63
	 */
64
	public function isRevoked(): bool
65
	{
66
		return $this->revoked;
67
	}
68
69
	/**
70
	 * @param bool $revoked
71
	 */
72
	public function setRevoked(bool $revoked)
73
	{
74
		$this->revoked = $revoked;
75
	}
76
77
	/**
78
	 * @return string
79
	 */
80
	public function getIdentifier()
81
	{
82
		return $this->identifier;
83
	}
84
85
	/**
86
	 * @param string $identifier
87
	 */
88
	public function setIdentifier($identifier)
89
	{
90
		$this->identifier = $identifier;
91
	}
92
93
	/**
94
	 * @return \DateTime
95
	 */
96
	public function getExpiryDateTime()
97
	{
98
		return $this->expiryDateTime;
99
	}
100
101
	/**
102
	 * @param \DateTime $dateTime
103
	 */
104
	public function setExpiryDateTime(\DateTime $dateTime)
105
	{
106
		$this->expiryDateTime = $dateTime;
107
	}
108
109
	/**
110
	 * @param AccessTokenEntityInterface $accessToken
111
	 */
112
	public function setAccessToken(AccessTokenEntityInterface $accessToken)
113
	{
114
		$this->accessToken = $accessToken;
115
	}
116
117
	/**
118
	 * @return AccessTokenEntityInterface
119
	 */
120
	public function getAccessToken()
121
	{
122
		return $this->accessToken;
123
	}
124
}
125