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

VersionTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getVersion() 0 4 1
A setVersion() 0 6 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