| Total Complexity | 7 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class Tile implements TileInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var PositionInterface |
||
| 16 | */ |
||
| 17 | private $position; |
||
| 18 | /** |
||
| 19 | * @var ImageInterface |
||
| 20 | */ |
||
| 21 | private $image; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param PositionInterface $position |
||
| 25 | * @param ImageInterface $image |
||
| 26 | */ |
||
| 27 | public function __construct( |
||
| 28 | PositionInterface $position, |
||
| 29 | ImageInterface $image |
||
| 30 | ) { |
||
| 31 | $this->position = $position; |
||
| 32 | $this->image = $image; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getImage() |
||
| 36 | { |
||
| 37 | return $this->image; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return PositionInterface |
||
| 42 | */ |
||
| 43 | public function getPosition() |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Converts single level tiles array into three level tree |
||
| 50 | * (face -> rows -> columns). |
||
| 51 | * |
||
| 52 | * @param TileInterface[] $tiles |
||
| 53 | * @return TileInterface[][][] |
||
| 54 | */ |
||
| 55 | public static function treeify(array $tiles) |
||
| 70 | } |
||
| 71 | } |
||
| 72 |