Tag::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\Entity\Blogs;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Table(name="tags", schema="posts")
9
 * @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\Blogs\TagRepository", readOnly=true)
10
 */
11
class Tag
12
{
13
    /**
14
     * @var int
15
     *
16
     * @ORM\Column(name="id", type="integer")
17
     * @ORM\Id
18
     * @ORM\GeneratedValue(strategy="AUTO")
19
     */
20
    private $id;
21
22
    /**
23
     * @var string
24
     *
25
     * @ORM\Column(name="text", type="text", unique=true)
26
     */
27
    private $text;
28
29
30
    public function __construct(string $text)
31
    {
32
        $this->text = $text;
33
    }
34
35
    public function getId(): int
36
    {
37
        return $this->id;
38
    }
39
40
    public function getText(): string
41
    {
42
        return $this->text;
43
    }
44
}
45