-
-
Notifications
You must be signed in to change notification settings - Fork 48
Refactor ColumnDefinitionParser
#1108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 5 commits
a2ce7b0
eda27b0
11690f8
56367f0
d9a9cfd
28bc7dc
c624b5e
9bab05e
3d8f279
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Yiisoft\Db\Syntax; | ||
|
|
||
| /** | ||
| * Parses column definition string. For example, `string(255)` or `int unsigned`. | ||
| */ | ||
| interface ColumnDefinitionParserInterface | ||
| { | ||
| /** | ||
| * Parses column definition string. | ||
| * | ||
| * @param string $definition The column definition string. For example, `string(255)` or `int unsigned`. | ||
| * | ||
| * @return array The column information. | ||
| * | ||
| * @psalm-return array{ | ||
| * check?: string, | ||
| * collation?: string, | ||
| * comment?: string, | ||
| * defaultValueRaw?: string, | ||
| * dimension?: positive-int, | ||
| * enumValues?: list<string>, | ||
| * extra?: string, | ||
| * notNull?: bool, | ||
| * scale?: int, | ||
| * size?: int, | ||
| * type: lowercase-string, | ||
| * unique?: bool, | ||
| * unsigned?: bool, | ||
| * } | ||
| */ | ||
| public function parse(string $definition): array; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Yiisoft\Db\Tests\Support\Stub; | ||
|
|
||
| use Yiisoft\Db\Syntax\AbstractColumnDefinitionParser; | ||
|
|
||
| final class StubColumnDefinitionParser extends AbstractColumnDefinitionParser | ||
| { | ||
| protected function parseTypeParams(string $type, string $params): array | ||
| { | ||
| return []; | ||
|
Comment on lines
+11
to
+13
|
||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.