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

PlaceRobot::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 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