From 88563b23f705b696e6f9c4f0acc182c18fdd64e2 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Mon, 16 Sep 2024 14:37:37 +0700 Subject: [PATCH] Finalize `ColumnDefinitionParser` --- src/Syntax/ColumnDefinitionParser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Syntax/ColumnDefinitionParser.php b/src/Syntax/ColumnDefinitionParser.php index 58411e256..a81f79e15 100644 --- a/src/Syntax/ColumnDefinitionParser.php +++ b/src/Syntax/ColumnDefinitionParser.php @@ -21,7 +21,7 @@ * * @psalm-import-type ColumnInfo from ColumnSchemaInterface */ -class ColumnDefinitionParser +final class ColumnDefinitionParser { /** * Parses column definition string. @@ -53,14 +53,14 @@ public function parse(string $definition): array return $info + $this->extraInfo($extra); } - protected function enumInfo(string $values): array + private function enumInfo(string $values): array { preg_match_all("/'([^']*)'/", $values, $matches); return ['enum_values' => $matches[1]]; } - protected function extraInfo(string $extra): array + private function extraInfo(string $extra): array { if (empty($extra)) { return []; @@ -80,7 +80,7 @@ protected function extraInfo(string $extra): array return $info; } - protected function sizeInfo(string $size): array + private function sizeInfo(string $size): array { $values = explode(',', $size);