Passed
Push — development ( 4c608a...0dfecd )
by Alexander
04:55 queued 01:52
created

ApplicationTrait::getApplication()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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-2018 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 Veles\Application\Traits;
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 2
	public function getApplication()
30
	{
31 2
		return $this->application;
32
	}
33
34
	/**
35
	 * Set application
36
	 *
37
	 * @param Application $application
38
	 *
39
	 * @return $this
40
	 */
41 2
	public function setApplication(Application $application)
42
	{
43 2
		$this->application = $application;
44
45 2
		return $this;
46
	}
47
}
48