Completed
Push — master ( 4d66f1...f5cb76 )
by Derek Stephen
06:43
created

Scope   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 68
Duplicated Lines 0 %

Test Coverage

Coverage 58.33%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 68
ccs 7
cts 12
cp 0.5833
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getIdentifier() 0 3 1
A getId() 0 3 1
A getDescription() 0 3 1
A setIdentifier() 0 3 1
A setDescription() 0 3 1
A jsonSerialize() 0 3 1
1
<?php
2
3
namespace OAuth;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\ORM\Mapping as ORM;
7
use League\OAuth2\Server\Entities\ScopeEntityInterface;
8
9
/**
10
* @ORM\Entity(repositoryClass="OAuth\Repository\ScopeRepository")
11
* @ORM\Table(name="Scope")
12
*/
13
class Scope implements ScopeEntityInterface
14
{
15
    /**
16
     * @ORM\Id()
17
     * @ORM\GeneratedValue()
18
     * @ORM\Column(type="integer")
19
     * @var int|null
20
     */
21
    private $id;
22
23
    /**
24
     * @var string $identifier
25
     * @ORM\Column(type="string", length=40)
26
     */
27
    protected $identifier;
28
29
    /**
30
     * @var string $description
31 4
     * @ORM\Column(type="string", length=255)
32
     */
33 4
    private $description;
34
35
    /**
36
     * @return string
37
     */
38
    public function getIdentifier()
39 4
    {
40
        return $this->identifier;
41 4
    }
42 4
43
    /**
44
     * @param string $identifier
45
     */
46
    public function setIdentifier($identifier)
47
    {
48
        $this->identifier = $identifier;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getDescription(): string
55
    {
56
        return $this->description;
57
    }
58
59
    /**
60
     * @param string $description
61
     */
62
    public function setDescription(string $description): void
63 1
    {
64
        $this->description = $description;
65 1
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function jsonSerialize()
71
    {
72
        return $this->getIdentifier();
73
    }
74
75
    /**
76
     * @return int|null
77
     */
78
    public function getId(): ?int
79
    {
80
        return $this->id;
81
    }
82
}