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

VersionTrait::getVersion()   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 version set and get methods
4
 *
5
 * @file      VersionTrait.php
6
 *
7
 * PHP version 7.0+
8
 *
9
 * @author    Yancharuk Alexander <alex at itvault dot info>
10
 * @copyright © 2012-2018 Alexander Yancharuk
11
 * @date      2016-01-15 18:46
12
 * @license   The BSD 3-Clause License
13
 *            <http://opensource.org/licenses/BSD-3-Clause>
14
 */
15
16
namespace Veles\Application\Traits;
17
18
trait VersionTrait
19
{
20
	/** @var  string */
21
	protected $version;
22
23
	/**
24
	 * Get application version
25
	 *
26
	 * @return string
27
	 */
28 2
	public function getVersion()
29
	{
30 2
		return $this->version;
31
	}
32
33
	/**
34
	 * Set application version
35
	 *
36
	 * @param string $version
37
	 *
38
	 * @return $this
39
	 */
40 2
	public function setVersion($version)
41
	{
42 2
		$this->version = $version;
43
44 2
		return $this;
45
	}
46
}
47