MultiLineResponse::getLines()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the NNTP library.
5
 *
6
 * (c) Robin van der Vleuten <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Rvdv\Nntp\Response;
13
14
/**
15
 * MultiLineResponse.
16
 *
17
 * @author Robin van der Vleuten <[email protected]>
18
 */
19
class MultiLineResponse implements MultiLineResponseInterface
20
{
21
    /**
22
     * @var array
23
     */
24
    private $lines;
25
26
    /**
27
     * @var ResponseInterface
28
     */
29
    private $response;
30
31
    /**
32
     * Constructor.
33
     *
34
     * @param ResponseInterface $response
35
     * @param array             $lines
36
     */
37 2
    public function __construct(ResponseInterface $response, array $lines)
38
    {
39 2
        $this->response = $response;
40 2
        $this->lines = $lines;
41 2
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46 1
    public function getMessage()
47
    {
48 1
        return $this->response->getMessage();
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54 1
    public function getStatusCode()
55
    {
56 1
        return $this->response->getStatusCode();
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function getLines()
63
    {
64
        return $this->lines;
65
    }
66
67
    /**
68
     * {@inheritdoc}
69
     */
70 1
    public function __toString()
71
    {
72 1
        return (string) $this->response;
73
    }
74
}
75