diff --git a/src/Generator/Task/DatabaseTableColumnTypeTask.php b/src/Generator/Task/DatabaseTableColumnTypeTask.php index 663de164..6918f840 100644 --- a/src/Generator/Task/DatabaseTableColumnTypeTask.php +++ b/src/Generator/Task/DatabaseTableColumnTypeTask.php @@ -13,7 +13,7 @@ */ class DatabaseTableColumnTypeTask implements TaskInterface { - public const SET_TABLE_TYPES = 'tableTypes'; + public const SET_COLUMN_TYPES = 'columnTypes'; /** * @var string[] @@ -66,7 +66,7 @@ public function collect(): array { ksort($list); $result = []; - $registerArgumentsSet = new RegisterArgumentsSet(static::SET_TABLE_TYPES, $list); + $registerArgumentsSet = new RegisterArgumentsSet(static::SET_COLUMN_TYPES, $list); $result[$registerArgumentsSet->key()] = $registerArgumentsSet; foreach ($this->aliases as $alias) { diff --git a/tests/TestCase/Generator/Task/DatabaseTableColumnTypeTaskTest.php b/tests/TestCase/Generator/Task/DatabaseTableColumnTypeTaskTest.php index 14dc7c90..c5a3d79f 100644 --- a/tests/TestCase/Generator/Task/DatabaseTableColumnTypeTaskTest.php +++ b/tests/TestCase/Generator/Task/DatabaseTableColumnTypeTaskTest.php @@ -48,7 +48,7 @@ public function testCollect() { /** @var \IdeHelper\Generator\Directive\RegisterArgumentsSet $directive */ $directive = array_shift($result); - $this->assertSame(DatabaseTableColumnTypeTask::SET_TABLE_TYPES, $directive->toArray()['set']); + $this->assertSame(DatabaseTableColumnTypeTask::SET_COLUMN_TYPES, $directive->toArray()['set']); $list = $directive->toArray()['list']; $list = array_map(function ($className) { @@ -92,7 +92,7 @@ public function testCollect() { }, $list); $expectedList = [ - 'argumentsSet(\'tableTypes\')', + 'argumentsSet(\'columnTypes\')', ]; $this->assertSame($expectedList, $list); } @@ -118,7 +118,7 @@ public function testCollectPluginLoaded() { /** @var \IdeHelper\Generator\Directive\RegisterArgumentsSet $directive */ $directive = array_shift($result); - $this->assertSame(DatabaseTableColumnTypeTask::SET_TABLE_TYPES, $directive->toArray()['set']); + $this->assertSame(DatabaseTableColumnTypeTask::SET_COLUMN_TYPES, $directive->toArray()['set']); $list = $directive->toArray()['list']; $list = array_map(function ($className) { @@ -143,7 +143,7 @@ public function testCollectPluginLoaded() { }, $list); $expectedList = [ - 'argumentsSet(\'tableTypes\')', + 'argumentsSet(\'columnTypes\')', ]; $this->assertSame($expectedList, $list); diff --git a/tests/test_files/meta/phpstorm/.meta.php b/tests/test_files/meta/phpstorm/.meta.php index a3017c67..96f9156f 100644 --- a/tests/test_files/meta/phpstorm/.meta.php +++ b/tests/test_files/meta/phpstorm/.meta.php @@ -598,7 +598,7 @@ expectedArguments( \Migrations\Table::addColumn(), 1, - argumentsSet('tableTypes') + argumentsSet('columnTypes') ); expectedArguments( @@ -610,7 +610,7 @@ expectedArguments( \Migrations\Table::changeColumn(), 1, - argumentsSet('tableTypes') + argumentsSet('columnTypes') ); expectedArguments( @@ -677,18 +677,7 @@ ); registerArgumentsSet( - 'routePaths', - 'Awesome.Admin/AwesomeHouses::openDoor', - 'Bar::index' - ); - - registerArgumentsSet( - 'tableNames', - 'wheels' - ); - - registerArgumentsSet( - 'tableTypes', + 'columnTypes', 'biginteger', 'binary', 'binaryuuid', @@ -712,6 +701,17 @@ 'year' ); + registerArgumentsSet( + 'routePaths', + 'Awesome.Admin/AwesomeHouses::openDoor', + 'Bar::index' + ); + + registerArgumentsSet( + 'tableNames', + 'wheels' + ); + registerArgumentsSet( 'validationWhen', 'create',