Passed
Push — master ( 99e9d5...233c5a )
by Derek Stephen
09:09
created

Scope::setDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0
cc 1
nc 1
nop 1
crap 2
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
     * @var string $identifier
17
     * @ORM\Id
18
     * @ORM\Column(type="string", length=40)
19
     */
20
    protected $identifier;
21
22
    /**
23
     * @var string $description
24
     * @ORM\Column(type="string", length=255)
25
     */
26
    private $description;
27
28 4
    /**
29
     * @return string
30 4
     */
31 4
    public function getIdentifier()
32
    {
33
        return $this->identifier;
34
    }
35
36 4
    /**
37
     * @param string $identifier
38 4
     */
39
    public function setIdentifier($identifier)
40
    {
41
        $this->identifier = $identifier;
42
    }
43
44 4
    /**
45
     * @return string
46 4
     */
47 4
    public function getDescription(): string
48
    {
49
        return $this->description;
50
    }
51
52 1
    /**
53
     * @param string $description
54 1
     */
55
    public function setDescription(string $description): void
56
    {
57
        $this->description = $description;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function jsonSerialize()
64
    {
65
        return $this->getIdentifier();
66
    }
67
}