Skip to content

Commit

Permalink
Finalize ColumnDefinitionParser
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Sep 16, 2024
1 parent 096212b commit 88563b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Syntax/ColumnDefinitionParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* @psalm-import-type ColumnInfo from ColumnSchemaInterface
*/
class ColumnDefinitionParser
final class ColumnDefinitionParser
{
/**
* Parses column definition string.
Expand Down Expand Up @@ -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 [];
Expand All @@ -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);

Expand Down

0 comments on commit 88563b2

Please sign in to comment.