TEntityCreator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 25%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 27
ccs 1
cts 4
cp 0.25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCreatedBy() 0 4 1
A getCreatedBy() 0 4 1
1
<?php
2
/**
3
 * TEntityCreator.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        https://www.ipublikuj.eu
7
 * @author         Adam Kadlec <[email protected]>
8
 * @package        iPublikuj:DoctrineBlameable!
9
 * @subpackage     Entities
10
 * @since          1.0.0
11
 *
12
 * @date           29.01.14
13
 */
14
15
declare(strict_types = 1);
16
17
namespace IPub\DoctrineBlameable\Entities;
18
19
use IPub\DoctrineBlameable\Mapping\Annotation as IPub;
20
21
/**
22
 * Doctrine blameable author entity
23
 *
24
 * @package        iPublikuj:DoctrineBlameable!
25
 * @subpackage     Entities
26
 *
27
 * @author         Adam Kadlec <[email protected]>
28
 */
29 1
trait TEntityCreator
30
{
31
	/**
32
	 * @var mixed|NULL
33
	 *
34
	 * @IPub\Blameable(on="create")
35
	 */
36
	protected $createdBy;
37
38
	/**
39
	 * @param mixed $createdBy
40
	 *
41
	 * @return void
42
	 */
43
	public function setCreatedBy($createdBy) : void
44
	{
45
		$this->createdBy = $createdBy;
46
	}
47
48
	/**
49
	 * @return mixed|NULL
50
	 */
51
	public function getCreatedBy()
52
	{
53
		return $this->createdBy;
54
	}
55
}
56