Skip to content

Commit c1ccf1e

Browse files
authored
formatting tidy
I was going to submit these as review comments, but it's less effort if i just fix them directly
1 parent 9f734d4 commit c1ccf1e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Facing.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ enum Facing{
4242
* Returns the axis of the given direction.
4343
*/
4444
public function axis() : Axis{
45-
return match ($this) {
45+
return match($this){
4646
self::DOWN, self::UP => Axis::Y,
4747
self::NORTH, self::SOUTH => Axis::Z,
4848
self::WEST, self::EAST => Axis::X,
@@ -53,7 +53,7 @@ public function axis() : Axis{
5353
* @phpstan-return non-empty-array<int>
5454
*/
5555
public function offset() : array{
56-
return match ($this) {
56+
return match($this){
5757
self::DOWN => [ 0, -1, 0],
5858
self::UP => [ 0, +1, 0],
5959
self::NORTH => [ 0, 0, -1],
@@ -74,7 +74,7 @@ public function isPositive() : bool{
7474
* Returns the opposite Facing of the specified one.
7575
*/
7676
public function opposite() : Facing{
77-
return match ($this) {
77+
return match($this){
7878
self::DOWN => self::UP,
7979
self::UP => self::DOWN,
8080
self::NORTH => self::SOUTH,
@@ -90,22 +90,22 @@ public function opposite() : Facing{
9090
* @throws \InvalidArgumentException
9191
*/
9292
public function rotate(Axis $axis, bool $clockwise) : Facing{
93-
$rotated = match ($axis) {
94-
Axis::Y => match ($this) {
93+
$rotated = match($axis){
94+
Axis::Y => match($this){
9595
self::NORTH => self::EAST,
9696
self::EAST => self::SOUTH,
9797
self::SOUTH => self::WEST,
9898
self::WEST => self::NORTH,
9999
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
100100
},
101-
Axis::Z => match ($this) {
101+
Axis::Z => match($this){
102102
self::UP => self::EAST,
103103
self::EAST => self::DOWN,
104104
self::DOWN => self::WEST,
105105
self::WEST => self::UP,
106106
default => throw new \InvalidArgumentException("Face " . strtolower($this->name) . " not match with Axis " . strtolower($axis->name))
107107
},
108-
Axis::X => match ($this) {
108+
Axis::X => match($this){
109109
self::UP => self::NORTH,
110110
self::NORTH => self::DOWN,
111111
self::DOWN => self::SOUTH,
@@ -146,4 +146,4 @@ public function rotateZ(bool $clockwise) : Facing{
146146
public function rotateX(bool $clockwise) : Facing{
147147
return $this->rotate(Axis::X, $clockwise);
148148
}
149-
}
149+
}

0 commit comments

Comments
 (0)