Completed
Push — development ( 1c3d48...61edbf )
by Alexander
03:31
created

ApplicationTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

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-2016 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
trait ApplicationTrait
19
{
20
	protected $application;
21
22
	/**
23
	 * Get application object
24
	 *
25
	 * @return mixed
26
	 */
27 1
	public function getApplication()
28
	{
29 1
		return $this->application;
30
	}
31
32
	/**
33
	 * Set application
34
	 *
35
	 * @param mixed $application
36
	 *
37
	 * @return $this
38
	 */
39 1
	public function setApplication($application)
40
	{
41 1
		$this->application = $application;
42
43 1
		return $this;
44
	}
45
}
46