| Total Complexity | 9 |
| Total Lines | 100 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Position implements PositionInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $face; |
||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | private $x; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | private $y; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $face |
||
| 28 | * @param int $x |
||
| 29 | * @param int $y |
||
| 30 | */ |
||
| 31 | public function __construct($face, $x, $y) |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function getFace() |
||
| 42 | { |
||
| 43 | return $this->face; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $face |
||
| 48 | * @return $this |
||
| 49 | */ |
||
| 50 | public function setFace($face) |
||
| 51 | { |
||
| 52 | $this->face = $face; |
||
| 53 | return $this; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return int |
||
| 58 | */ |
||
| 59 | public function getX() |
||
| 60 | { |
||
| 61 | return $this->x; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param int $x |
||
| 66 | * @return $this |
||
| 67 | */ |
||
| 68 | public function setX($x) |
||
| 69 | { |
||
| 70 | $this->x = $x; |
||
| 71 | return $this; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | public function getY() |
||
| 78 | { |
||
| 79 | return $this->y; |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param int $y |
||
| 84 | * @return $this |
||
| 85 | */ |
||
| 86 | public function setY($y) |
||
| 87 | { |
||
| 88 | $this->y = $y; |
||
| 89 | return $this; |
||
| 90 | } |
||
| 91 | |||
| 92 | public function toPatternParameters() |
||
| 103 | ]; |
||
| 104 | } |
||
| 105 | |||
| 106 | public function __toString() |
||
| 107 | { |
||
| 108 | $pattern = '{face: %s, x: %s, y: %s}'; |
||
| 110 | } |
||
| 111 | } |
||
| 112 |