Completed
Push — master ( 8f3cda...d8c432 )
by Alexander
06:59 queued 03:25
created

VersionTrait::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Trait for handling version set and get methods
4
 *
5
 * @file      VersionTrait.php
6
 *
7
 * PHP version 5.4+
8
 *
9
 * @author    Yancharuk Alexander <alex at itvault dot info>
10
 * @copyright © 2012-2016 Alexander Yancharuk <alex at itvault at info>
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;
17
18
trait VersionTrait
19
{
20
    /** @var  string */
21
    protected $version;
22
23
    /**
24
     * Get application version
25
     *
26
     * @return string
27
     */
28 1
    public function getVersion()
29
    {
30 1
        return $this->version;
31
    }
32
33
    /**
34
     * Set application version
35
     *
36
     * @param string $version
37
     *
38
     * @return $this
39
     */
40 1
    public function setVersion($version)
41
    {
42 1
        $this->version = $version;
43
44 1
        return $this;
45
    }
46
}
47