OwnerAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOwner() 0 4 1
A setOwner() 0 5 1
1
<?php
2
3
/**
4
 * This software package is licensed under `AGPL, Commercial` license[s].
5
 *
6
 * @package maslosoft/miniview
7
 * @license AGPL, Commercial
8
 *
9
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
10
 *
11
 * @link http://maslosoft.com/miniview/
12
 */
13
14
namespace Maslosoft\MiniView\Traits;
15
16
/**
17
 * OwnerTrait
18
 *
19
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
20
 */
21
trait OwnerAwareTrait
22
{
23
24
	/**
25
	 * Owner class
26
	 * @var object
27
	 */
28
	private $owner = null;
29
30
	/**
31
	 * Get view owner
32
	 * @return object
33
	 */
34
	public function getOwner()
35
	{
36
		return $this->owner;
37
	}
38
39
	/**
40
	 * Set view owner
41
	 * @param object $owner
42
	 * @return static
43
	 */
44
	public function setOwner($owner)
45
	{
46
		$this->owner = $owner;
47
		return $this;
48
	}
49
50
}
51