Completed
Push — master ( bce2bd...fc52ee )
by Douglas
01:38
created

PlaceRobot   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 22
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCoordinates() 0 4 1
A getDirection() 0 4 1
1
<?php
2
3
/**
4
 * (c) 2018 Douglas Reith.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
declare(strict_types=1);
10
11
namespace Reith\ToyRobot\Messaging\Command;
12
13
class PlaceRobot
14
{
15
    private $coordinates;
16
17
    private $direction;
18
19 1
    public function __construct(array $coordinates, string $direction)
20
    {
21 1
        $this->coordinates = $coordinates;
22 1
        $this->direction = $direction;
23 1
    }
24
25
    public function getCoordinates(): array
26
    {
27
        return $this->coordinates;
28
    }
29
30
    public function getDirection()
31
    {
32
        return $this->direction;
33
    }
34
}
35