Category   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 35
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
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