1 | <?php |
||
17 | abstract class AbstractSymmetricSpace implements SpaceInterface |
||
18 | { |
||
19 | private $dimensions; |
||
20 | |||
21 | private $boundarySize; |
||
22 | |||
23 | private $boundaryCondition; |
||
24 | |||
25 | /** |
||
26 | * @param int $dimensions |
||
27 | * @param int $boundarySize |
||
28 | */ |
||
29 | 9 | protected function __construct(int $dimensions, int $boundarySize) |
|
35 | |||
36 | /** |
||
37 | * @return Place |
||
38 | */ |
||
39 | 8 | protected function defaultPlacement(): Place |
|
44 | |||
45 | /** |
||
46 | * @param ?Place $place |
||
|
|||
47 | * |
||
48 | * @return Robot |
||
49 | */ |
||
50 | 5 | public function placeRobot(?Place $place = null): Robot |
|
59 | |||
60 | /** |
||
61 | * @param Place $place |
||
62 | * |
||
63 | * @return bool |
||
64 | * |
||
65 | * @throws \Reith\ToyRobot\Domain\Space\Exception\BoundaryTestException |
||
66 | */ |
||
67 | 5 | public function isAGoodPlace(Place $place): bool |
|
77 | |||
78 | /** |
||
79 | * @param Place $from |
||
80 | * @param Place|null $to If not supplied, origin is $from |
||
81 | * |
||
82 | * @throws PlaceDimensionsDoNotMatchSpaceException |
||
83 | * @throws \Reith\ToyRobot\Domain\Space\Exception\BoundaryTestException |
||
84 | */ |
||
85 | 7 | public function move(Place $from, ?Place $to = null): Place |
|
104 | |||
105 | /** |
||
106 | * For all the places passed, ensure they are of the same |
||
107 | * dimensionality. |
||
108 | * |
||
109 | * @param Place $place ... Places to check |
||
110 | * |
||
111 | * @throws PlaceDimensionsDoNotMatchSpaceException |
||
112 | */ |
||
113 | 7 | private function validateDimensionality(Place ...$places): void |
|
134 | } |
||
135 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.