Completed
Push — V2x ( ef7ee8...12ea12 )
by Daniel
03:24
created

NodeInfoResponse::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * This software consists of voluntary contributions made by many individuals
16
 * and is licensed under the MIT license.
17
 */
18
namespace Elastification\Client\Response\V2x;
19
20
use Elastification\Client\Response\Response;
21
22
/**
23
 * Class NodeInfoResponse
24
 *
25
 * @package Elastification\Client\Response\V2x
26
 * @author  Daniel Wendlandt
27
 */
28
class NodeInfoResponse extends Response
29
{
30
31
    const PROP_STATUS = 'status';
32
    const PROP_NAME = 'name';
33
    const PROP_CLUSTER_NAME = 'cluster_name';
34
    const PROP_VERSION = 'version';
35
    const PROP_TAGLINE = 'tagline';
36
37
    /**
38
     * Getter Method
39
     *
40
     * @return mixed
41
     * @author Daniel Wendlandt
42
     */
43 2
    public function getVersion()
44
    {
45 2
        $this->processData();
46
47 2
        return $this->get(self::PROP_VERSION);
48
    }
49
50
    /**
51
     * Getter Method
52
     *
53
     * @return mixed
54
     * @author Daniel Wendlandt
55
     */
56 2
    public function getName()
57
    {
58 2
        $this->processData();
59
60 2
        return $this->get(self::PROP_NAME);
61
    }
62
63
    /**
64
     * Getter Method
65
     *
66
     * @return mixed
67
     * @author Daniel Wendlandt
68
     */
69 2
    public function getClusterName()
70
    {
71 2
        $this->processData();
72
73 2
        return $this->get(self::PROP_CLUSTER_NAME);
74
    }
75
76
    /**
77
     * Getter Method
78
     *
79
     * @return mixed
80
     * @author Daniel Wendlandt
81
     */
82 2
    public function getTagline()
83
    {
84 2
        $this->processData();
85
86 2
        return $this->get(self::PROP_TAGLINE);
87
    }
88
89
}
90