Completed
Push — master ( 205443...4952c2 )
by Emlyn
07:58
created

Cli::withStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
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 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * @package    Fuel\Foundation
4
 * @version    2.0
5
 * @author     Fuel Development Team
6
 * @license    MIT License
7
 * @copyright  2010 - 2016 Fuel Development Team
8
 * @link       http://fuelphp.com
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fuel\Foundation\Response;
14
15
use Psr\Http\Message\StreamInterface;
16
17
class Cli implements ResponseInterface
18
{
19
	protected $statusCode;
20
	protected $body;
21
22 1
	public function getStatusCode()
23
	{
24 1
		return $this->statusCode;
25
	}
26
27 1
	public function getBody()
28
	{
29 1
		return $this->body;
30
	}
31
32 1
	public function withBody(StreamInterface $body)
33
	{
34 1
		$this->body = $body->__toString();
35 1
		return $this;
36
	}
37
38 1
	public function withStatus($status)
39
	{
40 1
		$this->statusCode = $status;
41 1
		return $this;
42
	}
43
}
44