Skip to content

Commit c9ebd9f

Browse files
committed
Remove unrealated changes
1 parent c1ccf1e commit c9ebd9f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Facing.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function axis() : Axis{
5050
}
5151

5252
/**
53-
* @phpstan-return non-empty-array<int>
53+
* @phpstan-return array{-1|0|1, -1|0|1, -1|0|1}
5454
*/
5555
public function offset() : array{
5656
return match($this){
@@ -87,7 +87,7 @@ public function opposite() : Facing{
8787
/**
8888
* Rotates the given direction around the axis.
8989
*
90-
* @throws \InvalidArgumentException
90+
* @throws \InvalidArgumentException if not possible to rotate this direction around $axis
9191
*/
9292
public function rotate(Axis $axis, bool $clockwise) : Facing{
9393
$rotated = match($axis){
@@ -96,21 +96,21 @@ public function rotate(Axis $axis, bool $clockwise) : Facing{
9696
self::EAST => self::SOUTH,
9797
self::SOUTH => self::WEST,
9898
self::WEST => self::NORTH,
99-
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
99+
default => throw new \InvalidArgumentException("Cannot rotate facing \"" . strtolower($this->name) . "\" around axis \"" . strtolower($axis->name) . "\"")
100100
},
101101
Axis::Z => match($this){
102102
self::UP => self::EAST,
103103
self::EAST => self::DOWN,
104104
self::DOWN => self::WEST,
105105
self::WEST => self::UP,
106-
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
106+
default => throw new \InvalidArgumentException("Cannot rotate facing \"" . strtolower($this->name) . "\" around axis \"" . strtolower($axis->name) . "\"")
107107
},
108108
Axis::X => match($this){
109109
self::UP => self::NORTH,
110110
self::NORTH => self::DOWN,
111111
self::DOWN => self::SOUTH,
112112
self::SOUTH => self::UP,
113-
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
113+
default => throw new \InvalidArgumentException("Cannot rotate facing \"" . strtolower($this->name) . "\" around axis \"" . strtolower($axis->name) . "\"")
114114
}
115115
};
116116

0 commit comments

Comments
 (0)