Completed
Push — master ( c54dd1...7d6afc )
by Douglas
03:28
created

PlaceRobot   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDirection() 0 4 1
A getCoordinates() 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 3
    public function __construct(array $coordinates, string $direction)
20
    {
21 3
        $this->coordinates = $coordinates;
22 3
        $this->direction = $direction;
23 3
    }
24
25 1
    public function getCoordinates(): array
26
    {
27 1
        return $this->coordinates;
28
    }
29
30
    public function getDirection()
31
    {
32
        return $this->direction;
33
    }
34
}
35