Test Setup Failed
Push — master ( 72a408...3f5e9b )
by Alexey
02:46
created

Tag::setText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 3
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", indexes={
9
 *      @ORM\Index(name="idx_tag_text", columns={"text"})
10
 * })
11
 * @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\Blogs\TagRepository", readOnly=true)
12
 */
13
class Tag
14
{
15
    /**
16
     * @var int
17
     *
18
     * @ORM\Column(name="id", type="integer")
19
     * @ORM\Id
20
     * @ORM\GeneratedValue(strategy="AUTO")
21
     */
22
    private $id;
23
24
    /**
25
     * @var string
26
     *
27
     * @ORM\Column(name="text", type="text", unique=true)
28
     */
29
    private $text;
30
31
32
    public function __construct(string $text)
33
    {
34
        $this->text = $text;
35
    }
36
37
    public function getId(): int
38
    {
39
        return $this->id;
40
    }
41
42
    public function getText(): string
43
    {
44
        return $this->text;
45
    }
46
}
47