Category::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zenify\DoctrineBehaviors\Tests\Entities\Source;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
9
use Zenify\DoctrineBehaviors\Entities\Attributes\Translatable as ZenifyTranslatable;
10
11
12
/**
13
 * @ORM\Entity
14
 */
15
class Category
16
{
17
18
	use Translatable;
19
	use ZenifyTranslatable;
20
21
	/**
22
	 * @ORM\Id
23
	 * @ORM\Column(type="integer")
24
	 * @ORM\GeneratedValue(strategy="IDENTITY")
25
	 * @var int
26
	 */
27
	private $id;
28
29
30
	/**
31
	 * @param string $name
32
	 * @param bool $isActive
33
	 */
34
	public function __construct($name, $isActive)
35
	{
36
		$this->proxyCurrentLocaleTranslation('setName', [$name]);
37
		$this->proxyCurrentLocaleTranslation('setIsActive', [$isActive]);
38
	}
39
40
41
	/**
42
	 * @return int
43
	 */
44
	public function getId()
45
	{
46
		return $this->id;
47
	}
48
49
}
50