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

EnvironmentTrait::getEnvironment()   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 handling Environment object
4
 *
5
 * @file      EnvironmentTrait.php
6
 *
7
 * PHP version 7.0+
8
 *
9
 * @author    Yancharuk Alexander <alex at itvault dot info>
10
 * @copyright © 2012-2018 Alexander Yancharuk <alex at itvault at info>
11
 * @date      2016-11-05 09:57
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\Environment;
19
20
trait EnvironmentTrait
21
{
22
	/** @var  Environment */
23
	protected $environment;
24
25
	/**
26
	 * Set application environment
27
	 *
28
	 * @param Environment $environment
29
	 *
30
	 * @return $this
31
	 */
32 2
	public function setEnvironment(Environment $environment)
33
	{
34 2
		$this->environment = $environment;
35
36 2
		return $this;
37
	}
38
39
	/**
40
	 * Get environment object
41
	 *
42
	 * @return Environment
43
	 */
44 2
	public function getEnvironment()
45
	{
46 2
		return $this->environment;
47
	}
48
}
49