Test Failed
Push — development ( ad8ac4...b69dbc )
by Alexander
03:40
created

ApplicationTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 28
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getApplication() 0 4 1
A setApplication() 0 6 1
1
<?php
2
/**
3
 * Trait for application object handling
4
 *
5
 * @file      ApplicationTrait.php
6
 *
7
 * PHP version 5.4+
8
 *
9
 * @author    Yancharuk Alexander <alex at itvault dot info>
10
 * @copyright © 2012-2017 Alexander Yancharuk
11
 * @date      2016-10-21 16:44
12
 * @license   The BSD 3-Clause License
13
 *            <https://tldrlegal.com/license/bsd-3-clause-license-(revised)>
14
 */
15
16
namespace Application;
17
18
use Veles\Application\Application;
19
20
trait ApplicationTrait
21
{
22
	protected $application;
23
24
	/**
25
	 * Get application object
26
	 *
27
	 * @return Application
28
	 */
29
	public function getApplication()
30
	{
31
		return $this->application;
32
	}
33
34
	/**
35
	 * Set application
36
	 *
37
	 * @param mixed $application
38
	 *
39
	 * @return $this
40
	 */
41
	public function setApplication($application)
42
	{
43
		$this->application = $application;
44
45
		return $this;
46
	}
47
}
48