Skip to content

Commit

Permalink
Remove unrealated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhaiven committed Dec 2, 2024
1 parent c1ccf1e commit c9ebd9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Facing.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function axis() : Axis{
}

/**
* @phpstan-return non-empty-array<int>
* @phpstan-return array{-1|0|1, -1|0|1, -1|0|1}
*/
public function offset() : array{
return match($this){
Expand Down Expand Up @@ -87,7 +87,7 @@ public function opposite() : Facing{
/**
* Rotates the given direction around the axis.
*
* @throws \InvalidArgumentException
* @throws \InvalidArgumentException if not possible to rotate this direction around $axis
*/
public function rotate(Axis $axis, bool $clockwise) : Facing{
$rotated = match($axis){
Expand All @@ -96,21 +96,21 @@ public function rotate(Axis $axis, bool $clockwise) : Facing{
self::EAST => self::SOUTH,
self::SOUTH => self::WEST,
self::WEST => self::NORTH,
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
default => throw new \InvalidArgumentException("Cannot rotate facing \"" . strtolower($this->name) . "\" around axis \"" . strtolower($axis->name) . "\"")
},
Axis::Z => match($this){
self::UP => self::EAST,
self::EAST => self::DOWN,
self::DOWN => self::WEST,
self::WEST => self::UP,
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
default => throw new \InvalidArgumentException("Cannot rotate facing \"" . strtolower($this->name) . "\" around axis \"" . strtolower($axis->name) . "\"")
},
Axis::X => match($this){
self::UP => self::NORTH,
self::NORTH => self::DOWN,
self::DOWN => self::SOUTH,
self::SOUTH => self::UP,
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
default => throw new \InvalidArgumentException("Cannot rotate facing \"" . strtolower($this->name) . "\" around axis \"" . strtolower($axis->name) . "\"")
}
};

Expand Down

0 comments on commit c9ebd9f

Please sign in to comment.