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

Cli   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatusCode() 0 4 1
A getBody() 0 4 1
A withBody() 0 5 1
A withStatus() 0 5 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