From c57703299b0989db501caf892e2e3331552a68ad Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 5 Jul 2024 23:44:36 +0900 Subject: refactor: move some internal classes to Internal namespace --- src/BinaryFormat/Code.php | 20 -------------------- src/BinaryFormat/Decoder.php | 3 +++ src/BinaryFormat/Internal/Code.php | 23 +++++++++++++++++++++++ src/BinaryFormat/Internal/Locals.php | 22 ++++++++++++++++++++++ src/BinaryFormat/Internal/SectionId.php | 25 +++++++++++++++++++++++++ src/BinaryFormat/Locals.php | 19 ------------------- src/BinaryFormat/SectionId.php | 22 ---------------------- 7 files changed, 73 insertions(+), 61 deletions(-) delete mode 100644 src/BinaryFormat/Code.php create mode 100644 src/BinaryFormat/Internal/Code.php create mode 100644 src/BinaryFormat/Internal/Locals.php create mode 100644 src/BinaryFormat/Internal/SectionId.php delete mode 100644 src/BinaryFormat/Locals.php delete mode 100644 src/BinaryFormat/SectionId.php diff --git a/src/BinaryFormat/Code.php b/src/BinaryFormat/Code.php deleted file mode 100644 index 6acf1e7..0000000 --- a/src/BinaryFormat/Code.php +++ /dev/null @@ -1,20 +0,0 @@ - $compressedLocals - * @param list $body - */ - public function __construct( - public array $compressedLocals, - public array $body, - ) { - } -} diff --git a/src/BinaryFormat/Decoder.php b/src/BinaryFormat/Decoder.php index 4b47b19..3c23fc8 100644 --- a/src/BinaryFormat/Decoder.php +++ b/src/BinaryFormat/Decoder.php @@ -4,6 +4,9 @@ declare(strict_types=1); namespace Nsfisis\Waddiwasi\BinaryFormat; +use Nsfisis\Waddiwasi\BinaryFormat\Internal\Code; +use Nsfisis\Waddiwasi\BinaryFormat\Internal\Locals; +use Nsfisis\Waddiwasi\BinaryFormat\Internal\SectionId; use Nsfisis\Waddiwasi\Structure\Instructions\Instr; use Nsfisis\Waddiwasi\Structure\Instructions\Instrs; use Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control\BlockType; diff --git a/src/BinaryFormat/Internal/Code.php b/src/BinaryFormat/Internal/Code.php new file mode 100644 index 0000000..bc30c92 --- /dev/null +++ b/src/BinaryFormat/Internal/Code.php @@ -0,0 +1,23 @@ + $compressedLocals + * @param list $body + */ + public function __construct( + public array $compressedLocals, + public array $body, + ) { + } +} diff --git a/src/BinaryFormat/Internal/Locals.php b/src/BinaryFormat/Internal/Locals.php new file mode 100644 index 0000000..3938371 --- /dev/null +++ b/src/BinaryFormat/Internal/Locals.php @@ -0,0 +1,22 @@ +