From a05d7fcab11d695305f5b3c5efb0a9f967be4117 Mon Sep 17 00:00:00 2001 From: standard Date: Tue, 14 Jan 2025 21:20:24 +0100 Subject: [PATCH] Object serialization micro-optimization --- src/Variant/AbstractPiece.php | 2 +- src/Variant/Capablanca/Board.php | 2 +- src/Variant/Capablanca/{Rule => }/CastlingRule.php | 4 ++-- src/Variant/Capablanca/FEN/Str.php | 2 +- src/Variant/Capablanca/FEN/StrToBoard.php | 2 +- src/Variant/CapablancaFischer/Board.php | 2 +- src/Variant/CapablancaFischer/{Rule => }/CastlingRule.php | 4 ++-- src/Variant/CapablancaFischer/FEN/StrToBoard.php | 2 +- src/Variant/Chess960/Board.php | 2 +- src/Variant/Chess960/{Rule => }/CastlingRule.php | 4 ++-- src/Variant/Chess960/FEN/StrToBoard.php | 2 +- src/Variant/Classical/Board.php | 2 +- src/Variant/Classical/{Rule => }/CastlingRule.php | 2 +- src/Variant/Classical/FEN/Str.php | 2 +- src/Variant/Classical/FEN/StrToBoard.php | 2 +- src/Variant/Classical/PGN/Move.php | 3 +-- src/Variant/Dunsany/Board.php | 2 +- src/Variant/Dunsany/FEN/Str.php | 2 +- src/Variant/Dunsany/FEN/StrToBoard.php | 2 +- src/Variant/Losing/FEN/StrToBoard.php | 2 +- src/Variant/PieceArray.php | 2 +- tests/unit/Variant/Classical/BoardTest.php | 4 ++-- tests/unit/Variant/Classical/KTest.php | 2 +- tests/unit/Variant/Classical/PGN/MoveTest.php | 2 +- 24 files changed, 28 insertions(+), 29 deletions(-) rename src/Variant/Capablanca/{Rule => }/CastlingRule.php (94%) rename src/Variant/CapablancaFischer/{Rule => }/CastlingRule.php (81%) rename src/Variant/Chess960/{Rule => }/CastlingRule.php (83%) rename src/Variant/Classical/{Rule => }/CastlingRule.php (98%) diff --git a/src/Variant/AbstractPiece.php b/src/Variant/AbstractPiece.php index f4318e7cc..dc9324186 100644 --- a/src/Variant/AbstractPiece.php +++ b/src/Variant/AbstractPiece.php @@ -10,7 +10,7 @@ use Chess\Variant\Classical\PGN\AN\Castle; use Chess\Variant\Classical\PGN\AN\Color; use Chess\Variant\Classical\PGN\AN\Piece; -use Chess\Variant\Classical\Rule\CastlingRule; +use Chess\Variant\Classical\CastlingRule; abstract class AbstractPiece { diff --git a/src/Variant/Capablanca/Board.php b/src/Variant/Capablanca/Board.php index 2c8a0b185..47d07ba9b 100644 --- a/src/Variant/Capablanca/Board.php +++ b/src/Variant/Capablanca/Board.php @@ -7,7 +7,7 @@ use Chess\Variant\VariantType; use Chess\Variant\Capablanca\A; use Chess\Variant\Capablanca\C; -use Chess\Variant\Capablanca\Rule\CastlingRule; +use Chess\Variant\Capablanca\CastlingRule; use Chess\Variant\Capablanca\PGN\Move; use Chess\Variant\Capablanca\PGN\AN\Square; use Chess\Variant\Classical\B; diff --git a/src/Variant/Capablanca/Rule/CastlingRule.php b/src/Variant/Capablanca/CastlingRule.php similarity index 94% rename from src/Variant/Capablanca/Rule/CastlingRule.php rename to src/Variant/Capablanca/CastlingRule.php index ba75d8e3f..f041fadf4 100644 --- a/src/Variant/Capablanca/Rule/CastlingRule.php +++ b/src/Variant/Capablanca/CastlingRule.php @@ -1,11 +1,11 @@