From f253da8bedbd0d6f5748c41ab8e70925a3c8acd4 Mon Sep 17 00:00:00 2001 From: Bizley Date: Tue, 5 Sep 2023 15:39:04 +0200 Subject: [PATCH] Removed unnecessary docs --- src/Arranger.php | 2 - src/Comparator.php | 40 ----------- src/ComparatorInterface.php | 5 -- src/Extractor.php | 2 - src/ExtractorInterface.php | 1 - src/Generator.php | 15 ---- src/GeneratorInterface.php | 11 --- src/HistoryManager.php | 2 - src/HistoryManagerInterface.php | 2 - src/Inspector.php | 5 -- src/InspectorInterface.php | 5 -- src/Schema.php | 10 --- src/SqlColumnMapper.php | 5 -- src/SqlExtractorInterface.php | 1 - src/TableMapper.php | 12 ---- src/TableMapperInterface.php | 6 -- src/Updater.php | 10 --- src/UpdaterInterface.php | 9 --- src/controllers/FallbackFileHelper.php | 2 - src/controllers/MigrationController.php | 17 +---- src/dummy/MigrationChanges.php | 7 +- src/dummy/MigrationSql.php | 4 +- src/renderers/BlueprintRenderer.php | 72 ------------------- src/renderers/BlueprintRendererInterface.php | 14 ---- src/renderers/ColumnRenderer.php | 41 ----------- src/renderers/ColumnRendererInterface.php | 29 -------- src/renderers/ForeignKeyRenderer.php | 14 ---- src/renderers/ForeignKeyRendererInterface.php | 11 --- src/renderers/IndexRenderer.php | 8 --- src/renderers/IndexRendererInterface.php | 8 --- src/renderers/PrimaryKeyRenderer.php | 10 --- src/renderers/PrimaryKeyRendererInterface.php | 10 --- src/renderers/StructureRenderer.php | 53 -------------- src/renderers/StructureRendererInterface.php | 25 ------- src/table/BigIntegerColumn.php | 7 -- src/table/BigPrimaryKeyColumn.php | 8 --- src/table/BinaryColumn.php | 5 -- src/table/Blueprint.php | 21 ------ src/table/BlueprintInterface.php | 21 ------ src/table/BooleanColumn.php | 5 -- src/table/CharacterColumn.php | 5 -- src/table/Column.php | 36 ---------- src/table/ColumnFactory.php | 2 - src/table/ColumnInterface.php | 34 --------- src/table/DateColumn.php | 6 -- src/table/DateTimeColumn.php | 8 --- src/table/DecimalColumn.php | 5 -- src/table/DoubleColumn.php | 5 -- src/table/FloatColumn.php | 5 -- src/table/ForeignKey.php | 10 --- src/table/ForeignKeyInterface.php | 5 -- src/table/Index.php | 4 -- src/table/IndexInterface.php | 2 - src/table/IntegerColumn.php | 9 --- src/table/JsonColumn.php | 8 --- src/table/MoneyColumn.php | 5 -- src/table/PrimaryKey.php | 4 -- src/table/PrimaryKeyColumn.php | 8 --- src/table/PrimaryKeyInterface.php | 3 - .../PrimaryKeyVariantColumnInterface.php | 1 - src/table/SmallIntegerColumn.php | 8 --- src/table/StringColumn.php | 5 -- src/table/Structure.php | 16 ----- src/table/StructureBuilder.php | 31 -------- src/table/StructureBuilderInterface.php | 3 - src/table/StructureChange.php | 14 ---- src/table/StructureChangeInterface.php | 4 -- src/table/StructureInterface.php | 15 ---- src/table/TextColumn.php | 5 -- src/table/TimeColumn.php | 8 --- src/table/TimestampColumn.php | 7 -- src/table/TinyIntegerColumn.php | 8 --- 72 files changed, 6 insertions(+), 818 deletions(-) diff --git a/src/Arranger.php b/src/Arranger.php index daea435..34b922c 100644 --- a/src/Arranger.php +++ b/src/Arranger.php @@ -43,8 +43,6 @@ public function arrangeTables(array $inputTables): void /** * Adds dependency of the table. - * @param string $table - * @param string|null $dependsOnTable */ private function addDependency(string $table, string $dependsOnTable = null): void { diff --git a/src/Comparator.php b/src/Comparator.php index 04f4d87..ce8d0a6 100644 --- a/src/Comparator.php +++ b/src/Comparator.php @@ -25,12 +25,7 @@ public function __construct(bool $generalSchema) /** * Compares migration virtual structure with database structure and gathers required modifications. - * @param StructureInterface $newStructure - * @param StructureInterface $oldStructure - * @param BlueprintInterface $blueprint * @param bool $onlyShow whether changes should be only displayed - * @param string|null $schema - * @param string|null $engineVersion * @throws NotSupportedException */ public function compare( @@ -55,12 +50,6 @@ public function compare( /** * Compares the columns between new and old structure. - * @param StructureInterface $newStructure - * @param StructureInterface $oldStructure - * @param BlueprintInterface $blueprint - * @param bool $onlyShow - * @param string|null $schema - * @param string|null $engineVersion * @throws NotSupportedException */ private function compareColumns( @@ -195,11 +184,6 @@ private function compareColumns( /** * Compares the foreign keys between new and old structure. - * @param StructureInterface $newStructure - * @param StructureInterface $oldStructure - * @param BlueprintInterface $blueprint - * @param bool $onlyShow - * @param string|null $schema * @throws NotSupportedException */ private function compareForeignKeys( @@ -372,11 +356,6 @@ private function compareForeignKeys( /** * Compares the primary keys between new and old structure. - * @param PrimaryKeyInterface|null $newPrimaryKey - * @param PrimaryKeyInterface|null $oldPrimaryKey - * @param BlueprintInterface $blueprint - * @param bool $onlyShow - * @param string|null $schema * @throws NotSupportedException */ private function comparePrimaryKeys( @@ -435,8 +414,6 @@ private function comparePrimaryKeys( /** * Removes excessive primary key statements from the column in case the primary key will be added separately anyway. - * @param BlueprintInterface $blueprint - * @param string|null $schema */ private function removeExcessivePrimaryKeyStatements(BlueprintInterface $blueprint, ?string $schema): void { @@ -451,11 +428,7 @@ private function removeExcessivePrimaryKeyStatements(BlueprintInterface $bluepri /** * Checks whether the separate primary key needs to be added. - * @param BlueprintInterface $blueprint * @param array $differentColumns - * @param int $newColumnsCount - * @param string|null $schema - * @return bool */ private function shouldPrimaryKeyBeAdded( BlueprintInterface $blueprint, @@ -487,9 +460,6 @@ private function shouldPrimaryKeyBeAdded( /** * Compares the indexes between new and old structure. - * @param StructureInterface $newStructure - * @param StructureInterface $oldStructure - * @param BlueprintInterface $blueprint */ private function compareIndexes( StructureInterface $newStructure, @@ -566,9 +536,6 @@ private function compareIndexes( /** * Checks if append statements are the same in new and old structure. * Compares the actual statements and potential ones. - * @param ColumnInterface $newColumn - * @param ColumnInterface $oldColumn - * @return bool */ private function isAppendSame(ColumnInterface $newColumn, ColumnInterface $oldColumn): bool { @@ -595,7 +562,6 @@ private function isAppendSame(ColumnInterface $newColumn, ColumnInterface $oldCo /** * Strips append string from primary key and autoincrement constraints. - * @param string|null $append * @return array */ private function stripAppend(?string $append): array @@ -635,10 +601,6 @@ private function stripAppend(?string $append): array /** * Checks if columns' uniqueness is the same because of the unique index. - * @param StructureInterface $structure - * @param string $columnName - * @param bool $unique - * @return bool */ private function getRealUniqueness(StructureInterface $structure, string $columnName, bool $unique): bool { @@ -658,7 +620,6 @@ private function getRealUniqueness(StructureInterface $structure, string $column * Checks if length has the same value but written differently. * @param mixed $newLength * @param mixed $oldLength - * @return bool */ private function isLengthSame($newLength, $oldLength): bool { @@ -683,7 +644,6 @@ private function isLengthSame($newLength, $oldLength): bool /** * Returns values as strings. * @param mixed $value - * @return string */ private function stringifyValue($value): string { diff --git a/src/ComparatorInterface.php b/src/ComparatorInterface.php index f8f7ffc..06f2a42 100644 --- a/src/ComparatorInterface.php +++ b/src/ComparatorInterface.php @@ -12,12 +12,7 @@ interface ComparatorInterface { /** * Compares migration virtual structure with database structure and gathers required modifications. - * @param StructureInterface $newStructure - * @param StructureInterface $oldStructure - * @param BlueprintInterface $blueprint * @param bool $onlyShow whether changes should be only displayed - * @param string|null $schema - * @param string|null $engineVersion * @throws NotSupportedException */ public function compare( diff --git a/src/Extractor.php b/src/Extractor.php index 642718b..31ce878 100644 --- a/src/Extractor.php +++ b/src/Extractor.php @@ -34,7 +34,6 @@ public function __construct(Connection $db, bool $experimental = false) /** * Extracts migration data structures. - * @param string $migration * @param string[] $migrationPaths * @throws ErrorException */ @@ -56,7 +55,6 @@ public function extract(string $migration, array $migrationPaths): void /** * Loads a non-namespaced file. - * @param string $migration * @param string[] $migrationPaths * @throws ErrorException */ diff --git a/src/ExtractorInterface.php b/src/ExtractorInterface.php index 1a1d3e0..df4a1ee 100644 --- a/src/ExtractorInterface.php +++ b/src/ExtractorInterface.php @@ -11,7 +11,6 @@ interface ExtractorInterface { /** * Extracts migration data structures. - * @param string $migration * @param array $migrationPaths * @throws ErrorException */ diff --git a/src/Generator.php b/src/Generator.php index ef25fd7..fa14078 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -34,7 +34,6 @@ public function __construct( /** * Returns the translated alias of create table migration template. - * @return string */ public function getCreateTableMigrationTemplate(): string { @@ -45,7 +44,6 @@ public function getCreateTableMigrationTemplate(): string /** * Returns the translated alias of create foreign keys migration template. - * @return string */ public function getCreateForeignKeysMigrationTemplate(): string { @@ -56,8 +54,6 @@ public function getCreateForeignKeysMigrationTemplate(): string /** * Returns the normalized namespace (in case it uses incorrect slashes). - * @param string|null $namespace - * @return string|null */ private function getNormalizedNamespace(?string $namespace): ?string { @@ -66,13 +62,7 @@ private function getNormalizedNamespace(?string $namespace): ?string /** * Generates migration for the table. - * @param string $tableName - * @param string $migrationName * @param array $referencesToPostpone - * @param bool $usePrefix - * @param string $dbPrefix - * @param string|null $namespace - * @return string * @throws TableMissingException * @throws NotSupportedException */ @@ -120,11 +110,6 @@ public function getSuppressedForeignKeys(): array /** * Generates the migration for the foreign keys. * @param array $foreignKeys - * @param string $migrationName - * @param bool $usePrefix - * @param string $dbPrefix - * @param string|null $namespace - * @return string */ public function generateForForeignKeys( array $foreignKeys, diff --git a/src/GeneratorInterface.php b/src/GeneratorInterface.php index 8545c82..0d11a14 100644 --- a/src/GeneratorInterface.php +++ b/src/GeneratorInterface.php @@ -11,13 +11,7 @@ interface GeneratorInterface { /** * Generates migration for the table. - * @param string $tableName - * @param string $migrationName * @param array $referencesToPostpone - * @param bool $usePrefix - * @param string $dbPrefix - * @param string|null $namespace - * @return string * @throws TableMissingException * @throws NotSupportedException */ @@ -33,11 +27,6 @@ public function generateForTable( /** * Generates the migration for the foreign keys. * @param array $foreignKeys - * @param string $migrationName - * @param bool $usePrefix - * @param string $dbPrefix - * @param string|null $namespace - * @return string */ public function generateForForeignKeys( array $foreignKeys, diff --git a/src/HistoryManager.php b/src/HistoryManager.php index ab37abd..2c2f8be 100644 --- a/src/HistoryManager.php +++ b/src/HistoryManager.php @@ -60,8 +60,6 @@ private function createTable(): void /** * Adds migration history entry. - * @param string $migrationName - * @param string|null $namespace * @throws Exception * @throws NotSupportedException */ diff --git a/src/HistoryManagerInterface.php b/src/HistoryManagerInterface.php index 668512e..53108b9 100644 --- a/src/HistoryManagerInterface.php +++ b/src/HistoryManagerInterface.php @@ -11,8 +11,6 @@ interface HistoryManagerInterface { /** * Adds migration history entry. - * @param string $migrationName - * @param string|null $namespace * @throws Exception * @throws NotSupportedException */ diff --git a/src/Inspector.php b/src/Inspector.php index 1f26eb6..0edddae 100644 --- a/src/Inspector.php +++ b/src/Inspector.php @@ -47,13 +47,8 @@ public function __construct( /** * Prepares a blueprint for the upcoming update. - * @param StructureInterface $newStructure - * @param bool $onlyShow * @param array $migrationsToSkip * @param array $migrationPaths - * @param string|null $schema - * @param string|null $engineVersion - * @return BlueprintInterface * @throws InvalidConfigException * @throws ErrorException * @throws NotSupportedException diff --git a/src/InspectorInterface.php b/src/InspectorInterface.php index f2d3706..30be980 100644 --- a/src/InspectorInterface.php +++ b/src/InspectorInterface.php @@ -14,13 +14,8 @@ interface InspectorInterface { /** * Prepares a blueprint for the upcoming update. - * @param StructureInterface $newStructure - * @param bool $onlyShow * @param array $migrationsToSkip * @param array $migrationPaths - * @param string|null $schema - * @param string|null $engineVersion - * @return BlueprintInterface * @throws InvalidConfigException * @throws ErrorException * @throws NotSupportedException diff --git a/src/Schema.php b/src/Schema.php index 74d6002..5032abf 100644 --- a/src/Schema.php +++ b/src/Schema.php @@ -131,7 +131,6 @@ final class Schema /** * Returns schema code based on its class name. * @param mixed $schema - * @return string */ public static function identifySchema($schema): string { @@ -165,7 +164,6 @@ public static function identifySchema($schema): string /** * Checks whether the schema is SQLite. * @param mixed $schema - * @return bool */ public static function isSQLite($schema): bool { @@ -175,10 +173,6 @@ public static function isSQLite($schema): bool /** * Returns default length based on the schema and column type. * For MySQL >= 5.6.4 additional default sizes are available. - * @param string|null $schema - * @param string $type - * @param string|null $engineVersion - * @return string|null */ public static function getDefaultLength(?string $schema, string $type, string $engineVersion = null): ?string { @@ -195,10 +189,6 @@ public static function getDefaultLength(?string $schema, string $type, string $e /** * Returns alias definition based on the schema, column type, and length. - * @param string|null $schema - * @param string $type - * @param string $length - * @return string|null */ public static function getAlias(?string $schema, string $type, string $length): ?string { diff --git a/src/SqlColumnMapper.php b/src/SqlColumnMapper.php index 6645c01..a4d167a 100644 --- a/src/SqlColumnMapper.php +++ b/src/SqlColumnMapper.php @@ -24,7 +24,6 @@ class SqlColumnMapper private $schema = []; /** - * @param string $definition * @param array $typeMap */ private function __construct(string $definition, array $typeMap) @@ -38,7 +37,6 @@ private function __construct(string $definition, array $typeMap) } /** - * @param string $definition * @param array $typeMap * @return array */ @@ -213,9 +211,6 @@ private function detectUnique(): void } /** - * @param string $type - * @param string $sentence - * @param int $offset * @return array{0: int, 1: string} */ private function findPart(string $type, string $sentence, int $offset): array diff --git a/src/SqlExtractorInterface.php b/src/SqlExtractorInterface.php index e50e61a..d0c3eb6 100644 --- a/src/SqlExtractorInterface.php +++ b/src/SqlExtractorInterface.php @@ -13,7 +13,6 @@ interface SqlExtractorInterface extends ExtractorInterface { /** * Extracts migration SQL statements. - * @param string $migration * @param array $migrationPaths * @throws ErrorException */ diff --git a/src/TableMapper.php b/src/TableMapper.php index 45dbff2..997062b 100644 --- a/src/TableMapper.php +++ b/src/TableMapper.php @@ -42,9 +42,7 @@ public function __construct(Connection $db) /** * Returns a structure of the table. - * @param string $table * @param array $referencesToPostpone - * @return StructureInterface * @throws NotSupportedException */ public function getStructureOf(string $table, array $referencesToPostpone = []): StructureInterface @@ -73,7 +71,6 @@ public function getStructureOf(string $table, array $referencesToPostpone = []): /** * Returns the foreign keys of the table. - * @param string $table * @return array * @throws NotSupportedException */ @@ -101,7 +98,6 @@ private function getForeignKeys(string $table): array /** * Returns the indexes of the table. - * @param string $table * @return array * @throws NotSupportedException */ @@ -127,7 +123,6 @@ private function getIndexes(string $table): array /** * Returns a primary key of the table. - * @param string $table * @return PrimaryKeyInterface|null * @throws NotSupportedException */ @@ -150,7 +145,6 @@ private function getPrimaryKey(string $table): ?PrimaryKeyInterface /** * Returns the columns of the table. - * @param string $table * @param array $indexes * @return array * @throws NotSupportedException @@ -197,8 +191,6 @@ private function getColumns(string $table, array $indexes = []): array /** * @param array $indexes - * @param ColumnSchema $column - * @return bool */ private function isUnique(array $indexes, ColumnSchema $column): bool { @@ -223,8 +215,6 @@ public function getSuppressedForeignKeys(): array /** * Returns a table schema of the table. - * @param string $table - * @return TableSchema|null */ public function getTableSchema(string $table): ?TableSchema { @@ -233,7 +223,6 @@ public function getTableSchema(string $table): ?TableSchema /** * Returns a schema type. - * @return string * @throws NotSupportedException */ public function getSchemaType(): string @@ -245,7 +234,6 @@ public function getSchemaType(): string /** * Returns a DB engine version. - * @return string|null */ public function getEngineVersion(): ?string { diff --git a/src/TableMapperInterface.php b/src/TableMapperInterface.php index bdeb105..947044a 100644 --- a/src/TableMapperInterface.php +++ b/src/TableMapperInterface.php @@ -13,30 +13,24 @@ interface TableMapperInterface { /** * Returns a structure of the table. - * @param string $table * @param array $referencesToPostpone - * @return StructureInterface * @throws NotSupportedException */ public function getStructureOf(string $table, array $referencesToPostpone = []): StructureInterface; /** * Returns a table schema of the table. - * @param string $table - * @return TableSchema|null */ public function getTableSchema(string $table): ?TableSchema; /** * Returns a schema type. - * @return string * @throws NotSupportedException */ public function getSchemaType(): string; /** * Returns a DB engine version. - * @return string|null */ public function getEngineVersion(): ?string; diff --git a/src/Updater.php b/src/Updater.php index e034792..150c544 100644 --- a/src/Updater.php +++ b/src/Updater.php @@ -41,7 +41,6 @@ public function __construct( /** * Returns the translated alias of update table migration template. - * @return string */ public function getUpdateTableMigrationTemplate(): string { @@ -52,11 +51,8 @@ public function getUpdateTableMigrationTemplate(): string /** * Prepares a blueprint for update. - * @param string $tableName - * @param bool $onlyShow * @param array $migrationsToSkip * @param array $migrationPaths - * @return BlueprintInterface * @throws TableMissingException * @throws ErrorException * @throws InvalidConfigException @@ -89,12 +85,6 @@ private function getNormalizedNamespace(?string $namespace): ?string /** * Generates migration based on the blueprint. - * @param BlueprintInterface $blueprint - * @param string $migrationName - * @param bool $usePrefix - * @param string $dbPrefix - * @param string|null $namespace - * @return string * @throws NotSupportedException */ public function generateFromBlueprint( diff --git a/src/UpdaterInterface.php b/src/UpdaterInterface.php index 4fe10fc..3cd37c6 100644 --- a/src/UpdaterInterface.php +++ b/src/UpdaterInterface.php @@ -13,11 +13,8 @@ interface UpdaterInterface { /** * Prepares a blueprint for update. - * @param string $tableName - * @param bool $onlyShow * @param array $migrationsToSkip * @param array $migrationPaths - * @return BlueprintInterface * @throws TableMissingException * @throws ErrorException * @throws InvalidConfigException @@ -32,12 +29,6 @@ public function prepareBlueprint( /** * Generates migration based on the blueprint. - * @param BlueprintInterface $blueprint - * @param string $migrationName - * @param bool $usePrefix - * @param string $dbPrefix - * @param string|null $namespace - * @return string * @throws NotSupportedException */ public function generateFromBlueprint( diff --git a/src/controllers/FallbackFileHelper.php b/src/controllers/FallbackFileHelper.php index 1548271..431148c 100644 --- a/src/controllers/FallbackFileHelper.php +++ b/src/controllers/FallbackFileHelper.php @@ -10,9 +10,7 @@ class FallbackFileHelper { /** - * @param string $path * @param int|string|array|null $ownership - * @param int|null $mode * @throws \Exception */ public static function changeOwnership(string $path, $ownership, ?int $mode): void diff --git a/src/controllers/MigrationController.php b/src/controllers/MigrationController.php index 28f0aa8..3d86243 100644 --- a/src/controllers/MigrationController.php +++ b/src/controllers/MigrationController.php @@ -25,14 +25,14 @@ * Generates migration files based on the existing database table and previous migrations. * * @author Paweł Bizley Brzozowski - * @version 4.4.0 + * @version 4.4.1 * @license Apache 2.0 * https://github.com/bizley/yii2-migration */ class MigrationController extends BaseMigrationController { /** @var string */ - private $version = '4.4.0'; + private $version = '4.4.1'; /** * @var string|array Directory storing the migration classes. @@ -615,8 +615,6 @@ public function actionSql(string $migrationName, string $method = 'up'): int /** * Prepares path directory. If directory doesn't exist it's being created. - * @param string $path - * @return string * @throws Exception */ private function preparePathDirectory(string $path): string @@ -633,7 +631,6 @@ private function preparePathDirectory(string $path): string /** * Stores the content in a file under the given path. - * @param string $path * @param mixed $content * @throws \Throwable */ @@ -649,7 +646,6 @@ public function storeFile(string $path, $content): void /** * Fixes the migration history with a new entry. If migration history table doesn't exist it's being created first. - * @param string $migrationClassName * @throws DbException * @throws InvalidConfigException * @throws NotSupportedException @@ -666,7 +662,6 @@ private function fixHistory(string $migrationClassName): void /** * Generates migration for postponed foreign keys. * @param array $postponedForeignKeys - * @param string $migrationClassName * @throws DbException * @throws InvalidConfigException * @throws NotSupportedException @@ -697,8 +692,6 @@ private function generateMigrationForForeignKeys(array $postponedForeignKeys, st /** * Generates updating migration based on a blueprint. - * @param BlueprintInterface $blueprint - * @param string $migrationClassName * @throws DbException * @throws InvalidConfigException * @throws NotSupportedException @@ -727,8 +720,6 @@ private function generateMigrationWithBlueprint(BlueprintInterface $blueprint, s /** * Generates creating migration based on a table structure. - * @param string $tableName - * @param string $migrationClassName * @param array $referencesToPostpone * @throws DbException * @throws InvalidConfigException @@ -764,7 +755,6 @@ private function generateMigrationForTableCreation( /** * Prepares table names based on an input. Resulting names must not be on an excluded list. Migration history table * is always on the excluded list by default. - * @param string $inputTables * @return array * @throws NotSupportedException */ @@ -807,7 +797,6 @@ private function prepareTableNames(string $inputTables): array /** * Finds tables matching the pattern. - * @param string|null $pattern * @param array $allTables * @param array $excludedTables * @return array @@ -835,7 +824,6 @@ private function findMatchingTables( /** * Prepares table names and adds confirmation for proceeding with generating for the user. - * @param string $inputTable * @return array|null * @throws NotSupportedException */ @@ -876,7 +864,6 @@ private function proceedWithOperation(string $inputTable): ?array } /** - * @param Connection $db * @return array * @throws NotSupportedException */ diff --git a/src/dummy/MigrationChanges.php b/src/dummy/MigrationChanges.php index 385afd6..83dbec1 100644 --- a/src/dummy/MigrationChanges.php +++ b/src/dummy/MigrationChanges.php @@ -91,7 +91,6 @@ private function extractColumns(array $columns): array /** * Updates column properties based on schema type map. - * @param string $type * @param array $keyToDb * @param array $dbToKey * @return array @@ -229,8 +228,6 @@ private function getRawTableName(string $table): string /** * Adds method of structure change and its data. - * @param string $table - * @param string $method * @param mixed $data */ private function addChange(string $table, string $method, $data): void @@ -397,8 +394,8 @@ public function dropPrimaryKey(string $name, string $table): void } /** - * @param string|string[]$columns - * @param string|string[]$refColumns + * @param string|string[] $columns + * @param string|string[] $refColumns */ public function addForeignKey( string $name, diff --git a/src/dummy/MigrationSql.php b/src/dummy/MigrationSql.php index f91c5cb..63a7a16 100644 --- a/src/dummy/MigrationSql.php +++ b/src/dummy/MigrationSql.php @@ -196,8 +196,8 @@ public function dropPrimaryKey(string $name, string $table): void } /** - * @param string|string[]$columns - * @param string|string[]$refColumns + * @param string|string[] $columns + * @param string|string[] $refColumns */ public function addForeignKey( string $name, diff --git a/src/renderers/BlueprintRenderer.php b/src/renderers/BlueprintRenderer.php index c3b02a6..ce2b517 100644 --- a/src/renderers/BlueprintRenderer.php +++ b/src/renderers/BlueprintRenderer.php @@ -35,13 +35,6 @@ public function __construct( /** * Renders the blueprint for up(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#up()-detail - * @param BlueprintInterface $blueprint - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderUp( BlueprintInterface $blueprint, @@ -73,13 +66,6 @@ public function renderUp( /** * Renders the blueprint for down(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#down()-detail - * @param BlueprintInterface $blueprint - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderDown( BlueprintInterface $blueprint, @@ -111,10 +97,7 @@ public function renderDown( /** * Renders table name. Name should be provided without the prefix. If name should be with prefix and it is being * detected, prefix is removed from the name and replaced by a prefix structure ({{%}}). - * @param string $tableName * @param bool $usePrefix whether to add prefix structure to the name - * @param string|null $dbPrefix - * @return string */ public function renderName(string $tableName, bool $usePrefix, string $dbPrefix = null): string { @@ -131,11 +114,6 @@ public function renderName(string $tableName, bool $usePrefix, string $dbPrefix /** * Renders drop columns statements. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param bool $inverse - * @return string|null */ private function renderColumnsToDrop( BlueprintInterface $blueprint, @@ -160,13 +138,6 @@ private function renderColumnsToDrop( /** * Renders add columns statements. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $inverse - * @return string|null */ private function renderColumnsToAdd( BlueprintInterface $blueprint, @@ -202,13 +173,6 @@ private function renderColumnsToAdd( /** * Renders alter columns statements. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $inverse - * @return string|null */ private function renderColumnsToAlter( BlueprintInterface $blueprint, @@ -244,12 +208,6 @@ private function renderColumnsToAlter( /** * Renders drop foreign keys statements. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @param bool $inverse - * @return string|null */ private function renderForeignKeysToDrop( BlueprintInterface $blueprint, @@ -275,14 +233,6 @@ private function renderForeignKeysToDrop( /** * Renders add foreign keys statements. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @param bool $usePrefix - * @param string|null $dbPrefix - * @param bool $inverse - * @return string|null */ private function renderForeignKeysToAdd( BlueprintInterface $blueprint, @@ -316,11 +266,6 @@ private function renderForeignKeysToAdd( /** * Renders drop indexes statements. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param bool $inverse - * @return string|null */ private function renderIndexesToDrop( BlueprintInterface $blueprint, @@ -345,11 +290,6 @@ private function renderIndexesToDrop( /** * Renders add indexes statements. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param bool $inverse - * @return string|null */ private function renderIndexesToAdd( BlueprintInterface $blueprint, @@ -374,12 +314,6 @@ private function renderIndexesToAdd( /** * Renders drop primary key statement. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @param bool $inverse - * @return string|null */ private function renderPrimaryKeyToDrop( BlueprintInterface $blueprint, @@ -399,12 +333,6 @@ private function renderPrimaryKeyToDrop( /** * Renders add primary key statement. - * @param BlueprintInterface $blueprint - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @param bool $inverse - * @return string|null */ private function renderPrimaryKeyToAdd( BlueprintInterface $blueprint, diff --git a/src/renderers/BlueprintRendererInterface.php b/src/renderers/BlueprintRendererInterface.php index cd14685..ab018fc 100644 --- a/src/renderers/BlueprintRendererInterface.php +++ b/src/renderers/BlueprintRendererInterface.php @@ -11,13 +11,6 @@ interface BlueprintRendererInterface /** * Renders the blueprint for up(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#up()-detail - * @param BlueprintInterface $blueprint - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderUp( BlueprintInterface $blueprint, @@ -31,13 +24,6 @@ public function renderUp( /** * Renders the blueprint for down(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#down()-detail - * @param BlueprintInterface $blueprint - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderDown( BlueprintInterface $blueprint, diff --git a/src/renderers/ColumnRenderer.php b/src/renderers/ColumnRenderer.php index afca81c..53cdf1c 100644 --- a/src/renderers/ColumnRenderer.php +++ b/src/renderers/ColumnRenderer.php @@ -48,12 +48,6 @@ public function __construct(bool $generalSchema) /** * Renders the array part with column definition (name => definition). - * @param ColumnInterface $column - * @param PrimaryKeyInterface|null $primaryKey - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function render( ColumnInterface $column, @@ -79,13 +73,6 @@ public function render( /** * Renders the add column statement. - * @param ColumnInterface $column - * @param string $tableName - * @param PrimaryKeyInterface|null $primaryKey - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function renderAdd( ColumnInterface $column, @@ -114,13 +101,6 @@ public function renderAdd( /** * Renders the alter column statement. - * @param ColumnInterface $column - * @param string $tableName - * @param PrimaryKeyInterface|null $primaryKey - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function renderAlter( ColumnInterface $column, @@ -149,10 +129,6 @@ public function renderAlter( /** * Renders the drop column statement. - * @param ColumnInterface $column - * @param string $tableName - * @param int $indent - * @return string|null */ public function renderDrop(ColumnInterface $column, string $tableName, int $indent = 0): ?string { @@ -173,11 +149,6 @@ public function renderDrop(ColumnInterface $column, string $tableName, int $inde /** * Renders the column definition. - * @param ColumnInterface $column - * @param PrimaryKeyInterface|null $primaryKey - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function renderDefinition( ColumnInterface $column, @@ -198,10 +169,6 @@ public function renderDefinition( /** * Builds the column definition. - * @param ColumnInterface $column - * @param PrimaryKeyInterface|null $primaryKey - * @param string|null $schema - * @param string|null $engineVersion */ private function buildColumnDefinition( ColumnInterface $column, @@ -249,9 +216,6 @@ private function buildColumnDefinition( /** * Renders the column length. - * @param string $length - * @param string $defaultLength - * @return string|null */ private function getRenderedLength( string $length, @@ -271,9 +235,6 @@ private function getRenderedLength( /** * Builds general methods chain for column definition. - * @param ColumnInterface $column - * @param PrimaryKeyInterface|null $primaryKey - * @param string|null $schema */ private function buildGeneralDefinition( ColumnInterface $column, @@ -336,8 +297,6 @@ private function buildGeneralDefinition( /** * Escapes single quotes. - * @param string|null $value - * @return string|null */ public function escapeQuotes(?string $value): ?string { diff --git a/src/renderers/ColumnRendererInterface.php b/src/renderers/ColumnRendererInterface.php index 0406b29..0b4ac7a 100644 --- a/src/renderers/ColumnRendererInterface.php +++ b/src/renderers/ColumnRendererInterface.php @@ -11,12 +11,6 @@ interface ColumnRendererInterface { /** * Renders the array part with column definition (name => definition). - * @param ColumnInterface $column - * @param PrimaryKeyInterface|null $primaryKey - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function render( ColumnInterface $column, @@ -28,11 +22,6 @@ public function render( /** * Renders the column definition. - * @param ColumnInterface $column - * @param PrimaryKeyInterface|null $primaryKey - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function renderDefinition( ColumnInterface $column, @@ -43,13 +32,6 @@ public function renderDefinition( /** * Renders the add column statement. - * @param ColumnInterface $column - * @param string $tableName - * @param PrimaryKeyInterface|null $primaryKey - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function renderAdd( ColumnInterface $column, @@ -62,13 +44,6 @@ public function renderAdd( /** * Renders the alter column statement. - * @param ColumnInterface $column - * @param string $tableName - * @param PrimaryKeyInterface|null $primaryKey - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @return string|null */ public function renderAlter( ColumnInterface $column, @@ -81,10 +56,6 @@ public function renderAlter( /** * Renders the drop column statement. - * @param ColumnInterface $column - * @param string $tableName - * @param int $indent - * @return string|null */ public function renderDrop(ColumnInterface $column, string $tableName, int $indent = 0): ?string; } diff --git a/src/renderers/ForeignKeyRenderer.php b/src/renderers/ForeignKeyRenderer.php index 17b1ea7..114afec 100644 --- a/src/renderers/ForeignKeyRenderer.php +++ b/src/renderers/ForeignKeyRenderer.php @@ -36,12 +36,6 @@ public function __construct(bool $generalSchema) /** * Renders the add foreign key statement. - * @param ForeignKeyInterface $foreignKey - * @param string $tableName - * @param string $referencedTableName - * @param int $indent - * @param string|null $schema - * @return string * @throws NotSupportedException */ public function renderUp( @@ -97,11 +91,6 @@ public function renderUp( /** * Renders the drop foreign key statement. - * @param ForeignKeyInterface $foreignKey - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @return string * @throws NotSupportedException */ public function renderDown( @@ -131,9 +120,6 @@ public function renderDown( /** * Applies the indent to every row in the template. - * @param int $indent - * @param string $template - * @return string */ private function applyIndent(int $indent, string $template): string { diff --git a/src/renderers/ForeignKeyRendererInterface.php b/src/renderers/ForeignKeyRendererInterface.php index 8a37f0d..79cad6e 100644 --- a/src/renderers/ForeignKeyRendererInterface.php +++ b/src/renderers/ForeignKeyRendererInterface.php @@ -10,12 +10,6 @@ interface ForeignKeyRendererInterface { /** * Renders the add foreign key statement. - * @param ForeignKeyInterface $foreignKey - * @param string $tableName - * @param string $referencedTableName - * @param int $indent - * @param string|null $schema - * @return string */ public function renderUp( ForeignKeyInterface $foreignKey, @@ -27,11 +21,6 @@ public function renderUp( /** * Renders the drop foreign key statement. - * @param ForeignKeyInterface $foreignKey - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @return string */ public function renderDown( ForeignKeyInterface $foreignKey, diff --git a/src/renderers/IndexRenderer.php b/src/renderers/IndexRenderer.php index 4df0501..f6b871c 100644 --- a/src/renderers/IndexRenderer.php +++ b/src/renderers/IndexRenderer.php @@ -16,10 +16,6 @@ final class IndexRenderer implements IndexRendererInterface /** * Renders the add index statement. - * @param IndexInterface $index - * @param string $tableName - * @param int $indent - * @return string|null */ public function renderUp(IndexInterface $index, string $tableName, int $indent = 0): ?string { @@ -50,10 +46,6 @@ public function renderUp(IndexInterface $index, string $tableName, int $indent = /** * Renders the drop index statement. - * @param IndexInterface $index - * @param string $tableName - * @param int $indent - * @return string|null */ public function renderDown(IndexInterface $index, string $tableName, int $indent = 0): ?string { diff --git a/src/renderers/IndexRendererInterface.php b/src/renderers/IndexRendererInterface.php index 8b752c5..14c3758 100644 --- a/src/renderers/IndexRendererInterface.php +++ b/src/renderers/IndexRendererInterface.php @@ -10,19 +10,11 @@ interface IndexRendererInterface { /** * Renders the add index statement. - * @param IndexInterface $index - * @param string $tableName - * @param int $indent - * @return string|null */ public function renderUp(IndexInterface $index, string $tableName, int $indent = 0): ?string; /** * Renders the drop index statement. - * @param IndexInterface $index - * @param string $tableName - * @param int $indent - * @return string|null */ public function renderDown(IndexInterface $index, string $tableName, int $indent = 0): ?string; } diff --git a/src/renderers/PrimaryKeyRenderer.php b/src/renderers/PrimaryKeyRenderer.php index f60b7d8..a645e56 100644 --- a/src/renderers/PrimaryKeyRenderer.php +++ b/src/renderers/PrimaryKeyRenderer.php @@ -26,11 +26,6 @@ public function __construct(bool $generalSchema) /** * Renders the add primary key statement. - * @param PrimaryKeyInterface|null $primaryKey - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @return string|null * @throws NotSupportedException */ public function renderUp( @@ -72,11 +67,6 @@ public function renderUp( /** * Renders the drop primary key statement. - * @param PrimaryKeyInterface|null $primaryKey - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @return string|null * @throws NotSupportedException */ public function renderDown( diff --git a/src/renderers/PrimaryKeyRendererInterface.php b/src/renderers/PrimaryKeyRendererInterface.php index 3dd151f..9d37915 100644 --- a/src/renderers/PrimaryKeyRendererInterface.php +++ b/src/renderers/PrimaryKeyRendererInterface.php @@ -10,11 +10,6 @@ interface PrimaryKeyRendererInterface { /** * Renders the add primary key statement. - * @param PrimaryKeyInterface|null $primaryKey - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @return string|null */ public function renderUp( ?PrimaryKeyInterface $primaryKey, @@ -25,11 +20,6 @@ public function renderUp( /** * Renders the drop primary key statement. - * @param PrimaryKeyInterface|null $primaryKey - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @return string|null */ public function renderDown( ?PrimaryKeyInterface $primaryKey, diff --git a/src/renderers/StructureRenderer.php b/src/renderers/StructureRenderer.php index c3c0654..ee07407 100644 --- a/src/renderers/StructureRenderer.php +++ b/src/renderers/StructureRenderer.php @@ -55,10 +55,6 @@ public function __construct( /** * Renders table name. Name should be provided without the prefix. If name should be with prefix and it is being * detected, prefix is removed from the name and replaced by a prefix structure ({{%}}). - * @param string $tableName - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderName(string $tableName, bool $usePrefix, string $dbPrefix = null): string { @@ -76,13 +72,6 @@ public function renderName(string $tableName, bool $usePrefix, string $dbPrefix /** * Renders the migration structure for up(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#up()-detail - * @param StructureInterface $structure - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderStructureUp( StructureInterface $structure, @@ -109,11 +98,6 @@ public function renderStructureUp( /** * Renders the migration structure for down(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#down()-detail - * @param StructureInterface $structure - * @param int $indent - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderStructureDown( StructureInterface $structure, @@ -129,9 +113,6 @@ public function renderStructureDown( /** * Applies the indent to every row in the template. - * @param int $indent - * @param string $template - * @return string */ private function applyIndent(int $indent, string $template): string { @@ -151,12 +132,6 @@ private function applyIndent(int $indent, string $template): string /** * Renders the create-table statement. - * @param StructureInterface $structure - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @return string */ private function renderStructureTableUp( StructureInterface $structure, @@ -195,9 +170,6 @@ private function renderStructureTableUp( /** * Renders the drop-table statement. - * @param string $tableName - * @param int $indent - * @return string */ private function renderStructureTableDown( string $tableName, @@ -210,11 +182,6 @@ private function renderStructureTableDown( /** * Renders the add-primary-key statement. - * @param StructureInterface $structure - * @param string $tableName - * @param int $indent - * @param string|null $schema - * @return string|null */ private function renderStructurePrimaryKeyUp( StructureInterface $structure, @@ -227,10 +194,6 @@ private function renderStructurePrimaryKeyUp( /** * Renders the add indexes statements. - * @param StructureInterface $structure - * @param string $tableName - * @param int $indent - * @return string|null */ private function renderStructureIndexesUp( StructureInterface $structure, @@ -261,12 +224,6 @@ private function renderStructureIndexesUp( /** * Renders the add foreign keys statements (through the structure). - * @param StructureInterface $structure - * @param int $indent - * @param bool $usePrefix - * @param string|null $dbPrefix - * @param string|null $schema - * @return string|null */ private function renderStructureForeignKeysUp( StructureInterface $structure, @@ -287,11 +244,6 @@ private function renderStructureForeignKeysUp( /** * Renders the add foreign keys statements (direct). * @param array $foreignKeys - * @param int $indent - * @param bool $usePrefix - * @param string|null $dbPrefix - * @param string|null $schema - * @return string|null */ public function renderForeignKeysUp( array $foreignKeys, @@ -317,11 +269,6 @@ public function renderForeignKeysUp( /** * Renders the drop foreign keys statements. * @param array $foreignKeys - * @param int $indent - * @param bool $usePrefix - * @param string|null $dbPrefix - * @param string|null $schema - * @return string|null */ public function renderForeignKeysDown( array $foreignKeys, diff --git a/src/renderers/StructureRendererInterface.php b/src/renderers/StructureRendererInterface.php index 82d5e15..414b871 100644 --- a/src/renderers/StructureRendererInterface.php +++ b/src/renderers/StructureRendererInterface.php @@ -12,13 +12,6 @@ interface StructureRendererInterface /** * Renders the migration structure for up(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#up()-detail - * @param StructureInterface $structure - * @param int $indent - * @param string|null $schema - * @param string|null $engineVersion - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderStructureUp( StructureInterface $structure, @@ -32,11 +25,6 @@ public function renderStructureUp( /** * Renders the migration structure for down(). * @see https://www.yiiframework.com/doc/api/2.0/yii-db-migration#down()-detail - * @param StructureInterface $structure - * @param int $indent - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderStructureDown( StructureInterface $structure, @@ -48,21 +36,12 @@ public function renderStructureDown( /** * Renders table name. Name should be provided without the prefix. If name should be with prefix and it is being * detected, prefix is removed from the name and replaced by a prefix structure ({{%}}). - * @param string $tableName - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string */ public function renderName(string $tableName, bool $usePrefix, string $dbPrefix = null): string; /** * Renders the add foreign keys statements (direct). * @param array $foreignKeys - * @param int $indent - * @param bool $usePrefix - * @param string|null $dbPrefix - * @param string|null $schema - * @return string|null */ public function renderForeignKeysUp( array $foreignKeys, @@ -75,10 +54,6 @@ public function renderForeignKeysUp( /** * Renders the drop foreign keys statements. * @param array $foreignKeys - * @param int $indent - * @param bool $usePrefix - * @param string|null $dbPrefix - * @return string|null */ public function renderForeignKeysDown( array $foreignKeys, diff --git a/src/table/BigIntegerColumn.php b/src/table/BigIntegerColumn.php index 3358e54..0071782 100644 --- a/src/table/BigIntegerColumn.php +++ b/src/table/BigIntegerColumn.php @@ -14,9 +14,6 @@ final class BigIntegerColumn extends Column implements PrimaryKeyVariantColumnIn /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be lower than 8.0.17. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -29,8 +26,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -41,8 +36,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { diff --git a/src/table/BigPrimaryKeyColumn.php b/src/table/BigPrimaryKeyColumn.php index dc2f63f..3fc3dc1 100644 --- a/src/table/BigPrimaryKeyColumn.php +++ b/src/table/BigPrimaryKeyColumn.php @@ -14,9 +14,6 @@ class BigPrimaryKeyColumn extends Column implements PrimaryKeyColumnInterface /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be lower than 8.0.17. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -29,8 +26,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -41,8 +36,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -54,7 +47,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/BinaryColumn.php b/src/table/BinaryColumn.php index 6b90a15..f65759f 100644 --- a/src/table/BinaryColumn.php +++ b/src/table/BinaryColumn.php @@ -13,8 +13,6 @@ final class BinaryColumn extends Column implements ColumnInterface /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -25,8 +23,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -38,7 +34,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/Blueprint.php b/src/table/Blueprint.php index f73136d..bb42d1a 100644 --- a/src/table/Blueprint.php +++ b/src/table/Blueprint.php @@ -53,7 +53,6 @@ final class Blueprint implements BlueprintInterface /** * Returns table name of the structure. - * @return string */ public function getTableName(): string { @@ -62,7 +61,6 @@ public function getTableName(): string /** * Sets table name for the structure. - * @param string $tableName */ public function setTableName(string $tableName): void { @@ -79,7 +77,6 @@ public function startFromScratch(): void /** * Checks if blueprint contains no changes because table requires creation migration. - * @return bool */ public function needsStartFromScratch(): bool { @@ -88,7 +85,6 @@ public function needsStartFromScratch(): bool /** * Adds single description of the change. - * @param string $description */ public function addDescription(string $description): void { @@ -106,7 +102,6 @@ public function getDescriptions(): array /** * Checks if blueprint is ready to proceed with the update of table. - * @return bool */ public function isPending(): bool { @@ -115,7 +110,6 @@ public function isPending(): bool /** * Adds added column. - * @param ColumnInterface $column */ public function addColumn(ColumnInterface $column): void { @@ -124,7 +118,6 @@ public function addColumn(ColumnInterface $column): void /** * Adds altered column. - * @param ColumnInterface $column */ public function alterColumn(ColumnInterface $column): void { @@ -133,7 +126,6 @@ public function alterColumn(ColumnInterface $column): void /** * Adds unaltered column. - * @param ColumnInterface $column */ public function reverseColumn(ColumnInterface $column): void { @@ -142,7 +134,6 @@ public function reverseColumn(ColumnInterface $column): void /** * Adds dropped column. - * @param ColumnInterface $column */ public function dropColumn(ColumnInterface $column): void { @@ -151,7 +142,6 @@ public function dropColumn(ColumnInterface $column): void /** * Adds added foreign key. - * @param ForeignKeyInterface $foreignKey */ public function addForeignKey(ForeignKeyInterface $foreignKey): void { @@ -160,7 +150,6 @@ public function addForeignKey(ForeignKeyInterface $foreignKey): void /** * Adds dropped foreign key. - * @param ForeignKeyInterface $foreignKey */ public function dropForeignKey(ForeignKeyInterface $foreignKey): void { @@ -169,7 +158,6 @@ public function dropForeignKey(ForeignKeyInterface $foreignKey): void /** * Adds dropped primary key. - * @param PrimaryKeyInterface $primaryKey */ public function dropPrimaryKey(PrimaryKeyInterface $primaryKey): void { @@ -178,7 +166,6 @@ public function dropPrimaryKey(PrimaryKeyInterface $primaryKey): void /** * Adds added primary key. - * @param PrimaryKeyInterface $primaryKey */ public function addPrimaryKey(PrimaryKeyInterface $primaryKey): void { @@ -187,7 +174,6 @@ public function addPrimaryKey(PrimaryKeyInterface $primaryKey): void /** * Adds added index. - * @param IndexInterface $index */ public function addIndex(IndexInterface $index): void { @@ -196,7 +182,6 @@ public function addIndex(IndexInterface $index): void /** * Adds dropped index. - * @param IndexInterface $index */ public function dropIndex(IndexInterface $index): void { @@ -259,7 +244,6 @@ public function getAddedForeignKeys(): array /** * Returns dropped primary key. - * @return PrimaryKeyInterface|null */ public function getDroppedPrimaryKey(): ?PrimaryKeyInterface { @@ -268,7 +252,6 @@ public function getDroppedPrimaryKey(): ?PrimaryKeyInterface /** * Returns added primary key. - * @return PrimaryKeyInterface|null */ public function getAddedPrimaryKey(): ?PrimaryKeyInterface { @@ -295,7 +278,6 @@ public function getAddedIndexes(): array /** * Returns old table's primary key. - * @return PrimaryKeyInterface|null */ public function getTableOldPrimaryKey(): ?PrimaryKeyInterface { @@ -304,7 +286,6 @@ public function getTableOldPrimaryKey(): ?PrimaryKeyInterface /** * Sets old table's primary key. - * @param PrimaryKeyInterface|null $tableOldPrimaryKey */ public function setTableOldPrimaryKey(?PrimaryKeyInterface $tableOldPrimaryKey): void { @@ -313,7 +294,6 @@ public function setTableOldPrimaryKey(?PrimaryKeyInterface $tableOldPrimaryKey): /** * Returns new table's primary key. - * @return PrimaryKeyInterface|null */ public function getTableNewPrimaryKey(): ?PrimaryKeyInterface { @@ -322,7 +302,6 @@ public function getTableNewPrimaryKey(): ?PrimaryKeyInterface /** * Sets new table's primary key. - * @param PrimaryKeyInterface|null $tableNewPrimaryKey */ public function setTableNewPrimaryKey(?PrimaryKeyInterface $tableNewPrimaryKey): void { diff --git a/src/table/BlueprintInterface.php b/src/table/BlueprintInterface.php index cb9366f..0175cda 100644 --- a/src/table/BlueprintInterface.php +++ b/src/table/BlueprintInterface.php @@ -8,13 +8,11 @@ interface BlueprintInterface { /** * Returns table name of the structure. - * @return string */ public function getTableName(): string; /** * Sets table name for the structure. - * @param string $tableName */ public function setTableName(string $tableName): void; @@ -25,13 +23,11 @@ public function startFromScratch(): void; /** * Checks if blueprint contains no changes because table requires creation migration. - * @return bool */ public function needsStartFromScratch(): bool; /** * Adds single description of the change. - * @param string $description */ public function addDescription(string $description): void; @@ -43,67 +39,56 @@ public function getDescriptions(): array; /** * Checks if blueprint is ready to proceed with the update of table. - * @return bool */ public function isPending(): bool; /** * Adds added column. - * @param ColumnInterface $column */ public function addColumn(ColumnInterface $column): void; /** * Adds altered column. - * @param ColumnInterface $column */ public function alterColumn(ColumnInterface $column): void; /** * Adds unaltered column. - * @param ColumnInterface $column */ public function reverseColumn(ColumnInterface $column): void; /** * Adds dropped column. - * @param ColumnInterface $column */ public function dropColumn(ColumnInterface $column): void; /** * Adds added foreign key. - * @param ForeignKeyInterface $foreignKey */ public function addForeignKey(ForeignKeyInterface $foreignKey): void; /** * Adds dropped foreign key. - * @param ForeignKeyInterface $foreignKey */ public function dropForeignKey(ForeignKeyInterface $foreignKey): void; /** * Adds dropped primary key. - * @param PrimaryKeyInterface $primaryKey */ public function dropPrimaryKey(PrimaryKeyInterface $primaryKey): void; /** * Adds added primary key. - * @param PrimaryKeyInterface $primaryKey */ public function addPrimaryKey(PrimaryKeyInterface $primaryKey): void; /** * Adds added index. - * @param IndexInterface $index */ public function addIndex(IndexInterface $index): void; /** * Adds dropped index. - * @param IndexInterface $index */ public function dropIndex(IndexInterface $index): void; @@ -145,13 +130,11 @@ public function getAddedForeignKeys(): array; /** * Returns dropped primary key. - * @return PrimaryKeyInterface|null */ public function getDroppedPrimaryKey(): ?PrimaryKeyInterface; /** * Returns added primary key. - * @return PrimaryKeyInterface|null */ public function getAddedPrimaryKey(): ?PrimaryKeyInterface; @@ -169,25 +152,21 @@ public function getAddedIndexes(): array; /** * Returns old table's primary key. - * @return PrimaryKeyInterface|null */ public function getTableOldPrimaryKey(): ?PrimaryKeyInterface; /** * Sets old table's primary key. - * @param PrimaryKeyInterface|null $tableOldPrimaryKey */ public function setTableOldPrimaryKey(?PrimaryKeyInterface $tableOldPrimaryKey): void; /** * Returns new table's primary key. - * @return PrimaryKeyInterface|null */ public function getTableNewPrimaryKey(): ?PrimaryKeyInterface; /** * Sets new table's primary key. - * @param PrimaryKeyInterface|null $tableNewPrimaryKey */ public function setTableNewPrimaryKey(?PrimaryKeyInterface $tableNewPrimaryKey): void; } diff --git a/src/table/BooleanColumn.php b/src/table/BooleanColumn.php index 9e3455c..8179807 100644 --- a/src/table/BooleanColumn.php +++ b/src/table/BooleanColumn.php @@ -16,8 +16,6 @@ final class BooleanColumn extends Column implements ColumnInterface /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -28,8 +26,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -41,7 +37,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/CharacterColumn.php b/src/table/CharacterColumn.php index 7831324..cd52418 100644 --- a/src/table/CharacterColumn.php +++ b/src/table/CharacterColumn.php @@ -8,8 +8,6 @@ final class CharacterColumn extends Column implements ColumnInterface { /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -20,8 +18,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -31,7 +27,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/Column.php b/src/table/Column.php index f52a5a3..703f973 100644 --- a/src/table/Column.php +++ b/src/table/Column.php @@ -55,7 +55,6 @@ abstract class Column /** * Returns name of the column. - * @return string */ public function getName(): string { @@ -64,7 +63,6 @@ public function getName(): string /** * Sets name for the column. - * @param string $name */ public function setName(string $name): void { @@ -73,7 +71,6 @@ public function setName(string $name): void /** * Returns type of the column. - * @return string */ public function getType(): string { @@ -82,7 +79,6 @@ public function getType(): string /** * Sets type for the column. - * @param string $type */ public function setType(string $type): void { @@ -91,7 +87,6 @@ public function setType(string $type): void /** * Checks whether the column can not be null. - * @return bool|null */ public function isNotNull(): ?bool { @@ -100,7 +95,6 @@ public function isNotNull(): ?bool /** * Sets the column to not be null. - * @param bool|null $notNull */ public function setNotNull(?bool $notNull): void { @@ -164,7 +158,6 @@ public function setScale($scale): void /** * Checks whether the column is unique. - * @return bool */ public function isUnique(): bool { @@ -173,7 +166,6 @@ public function isUnique(): bool /** * Sets the uniqueness of the column. - * @param bool $unique */ public function setUnique(bool $unique): void { @@ -182,7 +174,6 @@ public function setUnique(bool $unique): void /** * Checks whether the column is unsigned. - * @return bool */ public function isUnsigned(): bool { @@ -191,7 +182,6 @@ public function isUnsigned(): bool /** * Sets the unsigned flag for the column. - * @param bool $unsigned */ public function setUnsigned(bool $unsigned): void { @@ -218,7 +208,6 @@ public function setDefault($default): void /** * Checks whether the column is a primary key. - * @return bool */ public function isPrimaryKey(): bool { @@ -227,7 +216,6 @@ public function isPrimaryKey(): bool /** * Sets the primary key flag for the column. - * @param bool|null $primaryKey */ public function setPrimaryKey(?bool $primaryKey): void { @@ -236,7 +224,6 @@ public function setPrimaryKey(?bool $primaryKey): void /** * Checks whether the column has autoincrement flag. - * @return bool */ public function isAutoIncrement(): bool { @@ -245,7 +232,6 @@ public function isAutoIncrement(): bool /** * Sets the autoincrement flag for the column. - * @param bool $autoIncrement */ public function setAutoIncrement(bool $autoIncrement): void { @@ -254,7 +240,6 @@ public function setAutoIncrement(bool $autoIncrement): void /** * Returns the value of append statement of the column. - * @return string|null */ public function getAppend(): ?string { @@ -263,7 +248,6 @@ public function getAppend(): ?string /** * Sets the value for append statement for the column. - * @param string|null $append */ public function setAppend(?string $append): void { @@ -272,7 +256,6 @@ public function setAppend(?string $append): void /** * Returns the value for comment statement for the column. - * @return string|null */ public function getComment(): ?string { @@ -281,7 +264,6 @@ public function getComment(): ?string /** * Sets the value for comment statement for the column. - * @param string|null $comment */ public function setComment(?string $comment): void { @@ -290,7 +272,6 @@ public function setComment(?string $comment): void /** * Returns the value for after statement for the column. - * @return string|null */ public function getAfter(): ?string { @@ -299,7 +280,6 @@ public function getAfter(): ?string /** * Sets the value for after statement for the column. - * @param string|null $after */ public function setAfter(?string $after): void { @@ -308,7 +288,6 @@ public function setAfter(?string $after): void /** * Checks whether the column has first statement. - * @return bool */ public function isFirst(): bool { @@ -317,7 +296,6 @@ public function isFirst(): bool /** * Sets the column for the first statement. - * @param bool $first */ public function setFirst(bool $first): void { @@ -326,8 +304,6 @@ public function setFirst(bool $first): void /** * Checks if column is a part of the primary key. - * @param PrimaryKeyInterface $primaryKey - * @return bool */ public function isColumnInPrimaryKey(PrimaryKeyInterface $primaryKey): bool { @@ -336,8 +312,6 @@ public function isColumnInPrimaryKey(PrimaryKeyInterface $primaryKey): bool /** * Checks if information of primary key is set in append statement. - * @param string|null $schema - * @return bool */ public function isPrimaryKeyInfoAppended(?string $schema): bool { @@ -357,8 +331,6 @@ public function isPrimaryKeyInfoAppended(?string $schema): bool * Prepares append statement based on the schema. * @param bool $primaryKey whether the column is primary key * @param bool $autoIncrement whether the column has autoincrement flag - * @param string|null $schema - * @return string|null */ public function prepareSchemaAppend(bool $primaryKey, bool $autoIncrement, string $schema = null): ?string { @@ -387,8 +359,6 @@ public function prepareSchemaAppend(bool $primaryKey, bool $autoIncrement, strin /** * Escapes single quotes. - * @param string $value - * @return string */ public function escapeQuotes(string $value): string { @@ -397,8 +367,6 @@ public function escapeQuotes(string $value): string /** * Removes information of primary key in append statement and returns what is left. - * @param string|null $schema - * @return null|string */ public function removeAppendedPrimaryKeyInfo(?string $schema): ?string { @@ -436,8 +404,6 @@ public function removeAppendedPrimaryKeyInfo(?string $schema): ?string /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return string|int|null */ abstract public function getLength(string $schema = null, string $engineVersion = null); @@ -445,8 +411,6 @@ abstract public function getLength(string $schema = null, string $engineVersion /** * Sets length for the column. * @param string|int|array|null $value - * @param string|null $schema - * @param string|null $engineVersion */ abstract public function setLength($value, string $schema = null, string $engineVersion = null): void; } diff --git a/src/table/ColumnFactory.php b/src/table/ColumnFactory.php index 750e8d3..21f75e6 100644 --- a/src/table/ColumnFactory.php +++ b/src/table/ColumnFactory.php @@ -11,8 +11,6 @@ final class ColumnFactory { /** * Builds table column object based on the type. - * @param string $type - * @return ColumnInterface */ public static function build(string $type): ColumnInterface { diff --git a/src/table/ColumnInterface.php b/src/table/ColumnInterface.php index eb5a359..83b6461 100644 --- a/src/table/ColumnInterface.php +++ b/src/table/ColumnInterface.php @@ -8,51 +8,41 @@ interface ColumnInterface { /** * Returns name of the column. - * @return string */ public function getName(): string; /** * Sets name for the column. - * @param string $name */ public function setName(string $name): void; /** * Checks whether the column is a primary key. - * @return bool */ public function isPrimaryKey(): bool; /** * Sets the primary key flag for the column. - * @param bool|null $primaryKey */ public function setPrimaryKey(?bool $primaryKey): void; /** * Checks if column is a part of the primary key. - * @param PrimaryKeyInterface $primaryKey - * @return bool */ public function isColumnInPrimaryKey(PrimaryKeyInterface $primaryKey): bool; /** * Checks if information of primary key is set in append statement. - * @param string|null $schema - * @return bool */ public function isPrimaryKeyInfoAppended(?string $schema): bool; /** * Returns the value of append statement of the column. - * @return string|null */ public function getAppend(): ?string; /** * Sets the value for append statement for the column. - * @param string|null $append */ public function setAppend(?string $append): void; @@ -60,27 +50,21 @@ public function setAppend(?string $append): void; * Prepares append statement based on the schema. * @param bool $primaryKey whether the column is primary key * @param bool $autoIncrement whether the column has autoincrement flag - * @param string|null $schema - * @return string|null */ public function prepareSchemaAppend(bool $primaryKey, bool $autoIncrement, string $schema = null): ?string; /** * Removes information of primary key in append statement and returns what is left. - * @param string|null $schema - * @return null|string */ public function removeAppendedPrimaryKeyInfo(?string $schema): ?string; /** * Sets the value for comment statement for the column. - * @param string|null $comment */ public function setComment(?string $comment): void; /** * Returns the value for comment statement for the column. - * @return string|null */ public function getComment(): ?string; @@ -122,13 +106,11 @@ public function setScale($scale): void; /** * Checks whether the column can not be null. - * @return bool|null */ public function isNotNull(): ?bool; /** * Sets the column to not be null. - * @param bool|null $notNull */ public function setNotNull(?bool $notNull): void; @@ -146,32 +128,26 @@ public function setDefault($default): void; /** * Checks whether the column is unsigned. - * @return bool */ public function isUnsigned(): bool; /** * Sets the unsigned flag for the column. - * @param bool $unsigned */ public function setUnsigned(bool $unsigned): void; /** * Checks whether the column is unique. - * @return bool */ public function isUnique(): bool; /** * Sets the uniqueness of the column. - * @param bool $unique */ public function setUnique(bool $unique): void; /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return string|int|null */ public function getLength(string $schema = null, string $engineVersion = null); @@ -179,56 +155,46 @@ public function getLength(string $schema = null, string $engineVersion = null); /** * Sets length for the column. * @param string|int|array|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void; /** * Returns default column definition. - * @return string */ public function getDefinition(): string; /** * Returns the value for after statement for the column. - * @return string|null */ public function getAfter(): ?string; /** * Sets the value for after statement for the column. - * @param string|null $after */ public function setAfter(?string $after): void; /** * Checks whether the column has first statement. - * @return bool */ public function isFirst(): bool; /** * Sets the column for the first statement. - * @param bool $first */ public function setFirst(bool $first): void; /** * Checks whether the column has autoincrement flag. - * @return bool */ public function isAutoIncrement(): bool; /** * Sets the autoincrement flag for the column. - * @param bool $autoIncrement */ public function setAutoIncrement(bool $autoIncrement): void; /** * Returns type of the column. - * @return string */ public function getType(): string; } diff --git a/src/table/DateColumn.php b/src/table/DateColumn.php index a874e50..ae82377 100644 --- a/src/table/DateColumn.php +++ b/src/table/DateColumn.php @@ -9,8 +9,6 @@ final class DateColumn extends Column implements ColumnInterface /** * Sets length of the column. * @param mixed $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -18,9 +16,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion - * @return int|null */ public function getLength(string $schema = null, string $engineVersion = null): ?int { @@ -29,7 +24,6 @@ public function getLength(string $schema = null, string $engineVersion = null): /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/DateTimeColumn.php b/src/table/DateTimeColumn.php index 5ecff7c..ee10a65 100644 --- a/src/table/DateTimeColumn.php +++ b/src/table/DateTimeColumn.php @@ -28,8 +28,6 @@ public function setDefault($default): void /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -40,8 +38,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -53,9 +49,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be 5.6.4 or newer. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -68,7 +61,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/DecimalColumn.php b/src/table/DecimalColumn.php index d33d916..a3d7b6b 100644 --- a/src/table/DecimalColumn.php +++ b/src/table/DecimalColumn.php @@ -19,8 +19,6 @@ final class DecimalColumn extends Column implements ColumnInterface /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -36,8 +34,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|array|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -65,7 +61,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/DoubleColumn.php b/src/table/DoubleColumn.php index 2e16d37..0e4ee58 100644 --- a/src/table/DoubleColumn.php +++ b/src/table/DoubleColumn.php @@ -13,8 +13,6 @@ final class DoubleColumn extends Column implements ColumnInterface /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -25,8 +23,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -37,7 +33,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/FloatColumn.php b/src/table/FloatColumn.php index e485bc9..748618c 100644 --- a/src/table/FloatColumn.php +++ b/src/table/FloatColumn.php @@ -13,8 +13,6 @@ final class FloatColumn extends Column implements ColumnInterface /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -25,8 +23,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -37,7 +33,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/ForeignKey.php b/src/table/ForeignKey.php index 0aaabc8..2113b28 100644 --- a/src/table/ForeignKey.php +++ b/src/table/ForeignKey.php @@ -29,7 +29,6 @@ final class ForeignKey implements ForeignKeyInterface /** * Returns name of the foreign key. - * @return string */ public function getName(): string { @@ -41,7 +40,6 @@ public function getName(): string /** * Sets name for the foreign key. - * @param string|null $name */ public function setName(?string $name): void { @@ -70,7 +68,6 @@ public function setColumns(?array $columns): void /** * Returns referred table name of the foreign key. - * @return string */ public function getReferredTable(): string { @@ -79,7 +76,6 @@ public function getReferredTable(): string /** * Sets referred table name for the foreign key. - * @param string $referredTable */ public function setReferredTable(string $referredTable): void { @@ -106,7 +102,6 @@ public function setReferredColumns(array $referredColumns): void /** * Returns ON DELETE statement of the foreign key. - * @return string|null */ public function getOnDelete(): ?string { @@ -115,7 +110,6 @@ public function getOnDelete(): ?string /** * Sets ON DELETE statement for the foreign key. - * @param string|null $onDelete */ public function setOnDelete(?string $onDelete): void { @@ -124,7 +118,6 @@ public function setOnDelete(?string $onDelete): void /** * Returns ON UPDATE statement of the foreign key. - * @return string|null */ public function getOnUpdate(): ?string { @@ -133,7 +126,6 @@ public function getOnUpdate(): ?string /** * Sets ON UPDATE statement for the foreign key. - * @param string|null $onUpdate */ public function setOnUpdate(?string $onUpdate): void { @@ -142,7 +134,6 @@ public function setOnUpdate(?string $onUpdate): void /** * Returns table name of the foreign key. - * @return string */ public function getTableName(): string { @@ -151,7 +142,6 @@ public function getTableName(): string /** * Sets table name for the foreign key. - * @param string $tableName */ public function setTableName(string $tableName): void { diff --git a/src/table/ForeignKeyInterface.php b/src/table/ForeignKeyInterface.php index ed30b81..3f971f8 100644 --- a/src/table/ForeignKeyInterface.php +++ b/src/table/ForeignKeyInterface.php @@ -8,13 +8,11 @@ interface ForeignKeyInterface { /** * Returns name of the foreign key. - * @return string */ public function getName(): string; /** * Returns table name of the foreign key. - * @return string */ public function getTableName(): string; @@ -26,7 +24,6 @@ public function getColumns(): array; /** * Returns referred table name of the foreign key. - * @return string */ public function getReferredTable(): string; @@ -38,13 +35,11 @@ public function getReferredColumns(): array; /** * Returns ON DELETE statement of the foreign key. - * @return string|null */ public function getOnDelete(): ?string; /** * Returns ON UPDATE statement of the foreign key. - * @return string|null */ public function getOnUpdate(): ?string; } diff --git a/src/table/Index.php b/src/table/Index.php index 02f47ec..fe040a8 100644 --- a/src/table/Index.php +++ b/src/table/Index.php @@ -17,7 +17,6 @@ final class Index implements IndexInterface /** * Return name of the index. - * @return string|null */ public function getName(): ?string { @@ -26,7 +25,6 @@ public function getName(): ?string /** * Sets name for the index. - * @param string|null $name */ public function setName(?string $name): void { @@ -35,7 +33,6 @@ public function setName(?string $name): void /** * Checks whether the index is unique. - * @return bool */ public function isUnique(): bool { @@ -44,7 +41,6 @@ public function isUnique(): bool /** * Sets unique flag for the index. - * @param bool $unique */ public function setUnique(bool $unique): void { diff --git a/src/table/IndexInterface.php b/src/table/IndexInterface.php index f1ba4c9..71167c4 100644 --- a/src/table/IndexInterface.php +++ b/src/table/IndexInterface.php @@ -8,7 +8,6 @@ interface IndexInterface { /** * Return name of the index. - * @return string|null */ public function getName(): ?string; @@ -20,7 +19,6 @@ public function getColumns(): array; /** * Checks whether the index is unique. - * @return bool */ public function isUnique(): bool; } diff --git a/src/table/IntegerColumn.php b/src/table/IntegerColumn.php index 65d361c..10bfc8a 100644 --- a/src/table/IntegerColumn.php +++ b/src/table/IntegerColumn.php @@ -14,9 +14,6 @@ final class IntegerColumn extends Column implements PrimaryKeyVariantColumnInter /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be lower than 8.0.17. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -29,8 +26,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -41,8 +36,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -54,7 +47,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { @@ -63,7 +55,6 @@ public function getDefinition(): string /** * Returns primary key variant column definition. - * @return string */ public function getPrimaryKeyDefinition(): string { diff --git a/src/table/JsonColumn.php b/src/table/JsonColumn.php index 712474d..89d50cc 100644 --- a/src/table/JsonColumn.php +++ b/src/table/JsonColumn.php @@ -6,8 +6,6 @@ use yii\helpers\Json; -use function is_array; - final class JsonColumn extends Column implements ColumnInterface { /** @@ -25,9 +23,6 @@ public function setDefault($default): void /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion - * @return int|null */ public function getLength(string $schema = null, string $engineVersion = null): ?int { @@ -37,8 +32,6 @@ public function getLength(string $schema = null, string $engineVersion = null): /** * Sets length of the column. * @param mixed $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -46,7 +39,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/MoneyColumn.php b/src/table/MoneyColumn.php index eae7859..71c340a 100644 --- a/src/table/MoneyColumn.php +++ b/src/table/MoneyColumn.php @@ -8,8 +8,6 @@ final class MoneyColumn extends Column implements ColumnInterface { /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -21,8 +19,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|array|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -48,7 +44,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/PrimaryKey.php b/src/table/PrimaryKey.php index 0ffeba7..689437b 100644 --- a/src/table/PrimaryKey.php +++ b/src/table/PrimaryKey.php @@ -16,7 +16,6 @@ final class PrimaryKey implements PrimaryKeyInterface /** * Checks whether the primary key is composite. - * @return bool */ public function isComposite(): bool { @@ -25,7 +24,6 @@ public function isComposite(): bool /** * Returns name of the primary key. - * @return string */ public function getName(): string { @@ -34,7 +32,6 @@ public function getName(): string /** * Sets name for the primary key. - * @param string|null $name */ public function setName(?string $name): void { @@ -63,7 +60,6 @@ public function setColumns(?array $columns): void /** * Adds column to the primary key. - * @param string $name */ public function addColumn(string $name): void { diff --git a/src/table/PrimaryKeyColumn.php b/src/table/PrimaryKeyColumn.php index 547acd0..6f167d0 100644 --- a/src/table/PrimaryKeyColumn.php +++ b/src/table/PrimaryKeyColumn.php @@ -14,9 +14,6 @@ class PrimaryKeyColumn extends Column implements PrimaryKeyColumnInterface /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be lower than 8.0.17. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -29,8 +26,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -41,8 +36,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -54,7 +47,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/PrimaryKeyInterface.php b/src/table/PrimaryKeyInterface.php index 64af88f..8f39642 100644 --- a/src/table/PrimaryKeyInterface.php +++ b/src/table/PrimaryKeyInterface.php @@ -8,7 +8,6 @@ interface PrimaryKeyInterface { /** * Returns name of the primary key. - * @return string */ public function getName(): string; @@ -20,13 +19,11 @@ public function getColumns(): array; /** * Checks whether the primary key is composite. - * @return bool */ public function isComposite(): bool; /** * Adds column to the primary key. - * @param string $name */ public function addColumn(string $name): void; } diff --git a/src/table/PrimaryKeyVariantColumnInterface.php b/src/table/PrimaryKeyVariantColumnInterface.php index 07bd239..5252953 100644 --- a/src/table/PrimaryKeyVariantColumnInterface.php +++ b/src/table/PrimaryKeyVariantColumnInterface.php @@ -8,7 +8,6 @@ interface PrimaryKeyVariantColumnInterface extends ColumnInterface { /** * Returns primary key variant column definition. - * @return string */ public function getPrimaryKeyDefinition(): string; } diff --git a/src/table/SmallIntegerColumn.php b/src/table/SmallIntegerColumn.php index cb19b13..2c16a12 100644 --- a/src/table/SmallIntegerColumn.php +++ b/src/table/SmallIntegerColumn.php @@ -14,9 +14,6 @@ final class SmallIntegerColumn extends Column implements ColumnInterface /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be lower than 8.0.17. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -29,8 +26,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -41,8 +36,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -54,7 +47,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/StringColumn.php b/src/table/StringColumn.php index e22adf3..dfb1471 100644 --- a/src/table/StringColumn.php +++ b/src/table/StringColumn.php @@ -8,8 +8,6 @@ final class StringColumn extends Column implements ColumnInterface { /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -20,8 +18,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -31,7 +27,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/Structure.php b/src/table/Structure.php index 03b6ce0..2d0e18e 100644 --- a/src/table/Structure.php +++ b/src/table/Structure.php @@ -23,7 +23,6 @@ final class Structure implements StructureInterface /** * Returns name of the structure. - * @return string */ public function getName(): string { @@ -32,7 +31,6 @@ public function getName(): string /** * Sets name of the structure. - * @param string $name */ public function setName(string $name): void { @@ -41,7 +39,6 @@ public function setName(string $name): void /** * Returns primary key of the structure. - * @return PrimaryKeyInterface|null */ public function getPrimaryKey(): ?PrimaryKeyInterface { @@ -50,7 +47,6 @@ public function getPrimaryKey(): ?PrimaryKeyInterface /** * Sets primary key of the structure. - * @param PrimaryKeyInterface|null $primaryKey */ public function setPrimaryKey(?PrimaryKeyInterface $primaryKey): void { @@ -77,7 +73,6 @@ public function setColumns(array $columns): void /** * Adds column to the structure. - * @param ColumnInterface $column */ public function addColumn(ColumnInterface $column): void { @@ -86,7 +81,6 @@ public function addColumn(ColumnInterface $column): void /** * Removes column from the structure. - * @param string $name */ public function removeColumn(string $name): void { @@ -95,8 +89,6 @@ public function removeColumn(string $name): void /** * Returns column of given name of the structure. - * @param string $name - * @return ColumnInterface|null */ public function getColumn(string $name): ?ColumnInterface { @@ -114,8 +106,6 @@ public function getIndexes(): array /** * Returns index of given name of the structure. - * @param string $name - * @return IndexInterface|null */ public function getIndex(string $name): ?IndexInterface { @@ -133,7 +123,6 @@ public function setIndexes(array $indexes): void /** * Adds index to the structure. - * @param IndexInterface $index */ public function addIndex(IndexInterface $index): void { @@ -142,7 +131,6 @@ public function addIndex(IndexInterface $index): void /** * Removes index from the structure. - * @param string $name */ public function removeIndex(string $name): void { @@ -160,8 +148,6 @@ public function getForeignKeys(): array /** * Returns foreign key of given name of the structure. - * @param string $name - * @return ForeignKeyInterface|null */ public function getForeignKey(string $name): ?ForeignKeyInterface { @@ -179,7 +165,6 @@ public function setForeignKeys(array $foreignKeys): void /** * Adds foreign key to the structure. - * @param ForeignKeyInterface $foreignKey */ public function addForeignKey(ForeignKeyInterface $foreignKey): void { @@ -188,7 +173,6 @@ public function addForeignKey(ForeignKeyInterface $foreignKey): void /** * Removes foreign key from the structure. - * @param string $name */ public function removeForeignKey(string $name): void { diff --git a/src/table/StructureBuilder.php b/src/table/StructureBuilder.php index 75e9eb7..0405387 100644 --- a/src/table/StructureBuilder.php +++ b/src/table/StructureBuilder.php @@ -12,9 +12,6 @@ final class StructureBuilder implements StructureBuilderInterface /** * Builds table structure based on the list of changes from the Inspector. * @param array $changes - * @param string|null $schema - * @param string|null $engineVersion - * @return StructureInterface */ public function build(array $changes, ?string $schema, ?string $engineVersion): StructureInterface { @@ -95,10 +92,7 @@ public function build(array $changes, ?string $schema, ?string $engineVersion): /** * Applies create table value. - * @param StructureInterface $structure * @param array $columns - * @param string|null $schema - * @param string|null $engineVersion */ private function applyCreateTableValue( StructureInterface $structure, @@ -113,10 +107,6 @@ private function applyCreateTableValue( /** * Applies add column value. - * @param StructureInterface $structure - * @param ColumnInterface $column - * @param string|null $schema - * @param string|null $engineVersion */ private function applyAddColumnValue( StructureInterface $structure, @@ -148,8 +138,6 @@ private function applyAddColumnValue( /** * Applies drop column value. - * @param StructureInterface $structure - * @param string $columnName */ private function applyDropColumnValue(StructureInterface $structure, string $columnName): void { @@ -158,7 +146,6 @@ private function applyDropColumnValue(StructureInterface $structure, string $col /** * Applies rename column value. - * @param StructureInterface $structure * @param array $data */ private function applyRenameColumnValue(StructureInterface $structure, array $data): void @@ -174,9 +161,6 @@ private function applyRenameColumnValue(StructureInterface $structure, array $da /** * Applies add primary key value. - * @param StructureInterface $structure - * @param PrimaryKeyInterface $primaryKey - * @param string|null $schema */ private function applyAddPrimaryKeyValue( StructureInterface $structure, @@ -202,8 +186,6 @@ private function applyAddPrimaryKeyValue( /** * Applies drop primary key value. - * @param StructureInterface $structure - * @param string|null $schema */ private function applyDropPrimaryKeyValue(StructureInterface $structure, ?string $schema): void { @@ -225,8 +207,6 @@ private function applyDropPrimaryKeyValue(StructureInterface $structure, ?string /** * Applies add foreign key value. - * @param StructureInterface $structure - * @param ForeignKeyInterface $foreignKey */ private function applyAddForeignKeyValue(StructureInterface $structure, ForeignKeyInterface $foreignKey): void { @@ -235,8 +215,6 @@ private function applyAddForeignKeyValue(StructureInterface $structure, ForeignK /** * Applies drop foreign key value. - * @param StructureInterface $structure - * @param string $name */ private function applyDropForeignKeyValue(StructureInterface $structure, string $name): void { @@ -245,8 +223,6 @@ private function applyDropForeignKeyValue(StructureInterface $structure, string /** * Applies create index value. - * @param StructureInterface $structure - * @param IndexInterface $index */ private function applyCreateIndexValue(StructureInterface $structure, IndexInterface $index): void { @@ -266,8 +242,6 @@ private function applyCreateIndexValue(StructureInterface $structure, IndexInter /** * Applies drop index value. - * @param StructureInterface $structure - * @param string $name */ private function applyDropIndexValue(StructureInterface $structure, string $name): void { @@ -290,7 +264,6 @@ private function applyDropIndexValue(StructureInterface $structure, string $name /** * Applies add comment on column value. - * @param StructureInterface $structure * @param array $data */ private function applyAddCommentOnColumnValue(StructureInterface $structure, array $data): void @@ -303,8 +276,6 @@ private function applyAddCommentOnColumnValue(StructureInterface $structure, arr /** * Applies drop comment from column value. - * @param StructureInterface $structure - * @param string $columnName */ private function applyDropCommentFromColumnValue(StructureInterface $structure, string $columnName): void { @@ -316,8 +287,6 @@ private function applyDropCommentFromColumnValue(StructureInterface $structure, /** * Adds automatic indexes made by DB engine. - * @param StructureInterface $structure - * @param string|null $schema */ private function addHiddenIndexes(StructureInterface $structure, ?string $schema): void { diff --git a/src/table/StructureBuilderInterface.php b/src/table/StructureBuilderInterface.php index 958355b..5bcff41 100644 --- a/src/table/StructureBuilderInterface.php +++ b/src/table/StructureBuilderInterface.php @@ -9,9 +9,6 @@ interface StructureBuilderInterface /** * Builds table structure based on the list of changes from the Inspector. * @param array $changes - * @param string|null $schema - * @param string|null $engineVersion - * @return StructureInterface */ public function build(array $changes, ?string $schema, ?string $engineVersion): StructureInterface; } diff --git a/src/table/StructureChange.php b/src/table/StructureChange.php index f164846..2e0b09a 100644 --- a/src/table/StructureChange.php +++ b/src/table/StructureChange.php @@ -19,7 +19,6 @@ final class StructureChange implements StructureChangeInterface /** * Returns table name of the change. - * @return string */ public function getTable(): string { @@ -28,7 +27,6 @@ public function getTable(): string /** * Sets table name for the change. - * @param string $table */ public function setTable(string $table): void { @@ -37,7 +35,6 @@ public function setTable(string $table): void /** * Returns method of the change. - * @return string */ public function getMethod(): string { @@ -46,7 +43,6 @@ public function getMethod(): string /** * Sets method for the change. - * @param string $method */ public function setMethod(string $method): void { @@ -73,8 +69,6 @@ public function setData($data): void /** * Returns value of the change based on the method. - * @param string|null $schema - * @param string|null $engineVersion * @return mixed Change value */ public function getValue(string $schema = null, string $engineVersion = null) @@ -116,8 +110,6 @@ public function getValue(string $schema = null, string $engineVersion = null) /** * Returns create table value of the change. - * @param string|null $engineName - * @param string|null $engineVersion * @return array */ private function getValueForCreateTable(string $engineName = null, string $engineVersion = null): array @@ -175,9 +167,6 @@ private function getValueForRenameColumn(): array /** * Returns add column value of the change. - * @param string|null $engineName - * @param string|null $engineVersion - * @return ColumnInterface */ private function getValueForAddColumn(string $engineName = null, string $engineVersion = null): ColumnInterface { @@ -211,7 +200,6 @@ private function getValueForAddColumn(string $engineName = null, string $engineV /** * Returns add primary key value of the change. - * @return PrimaryKeyInterface */ private function getValueForAddPrimaryKey(): PrimaryKeyInterface { @@ -235,7 +223,6 @@ private function getValueForAddPrimaryKey(): PrimaryKeyInterface /** * Returns add foreign key value of the change. - * @return ForeignKeyInterface */ private function getValueForAddForeignKey(): ForeignKeyInterface { @@ -274,7 +261,6 @@ private function getValueForAddForeignKey(): ForeignKeyInterface /** * Returns create index value of the change. - * @return IndexInterface */ private function getValueForCreateIndex(): IndexInterface { diff --git a/src/table/StructureChangeInterface.php b/src/table/StructureChangeInterface.php index c47aeee..b563ee9 100644 --- a/src/table/StructureChangeInterface.php +++ b/src/table/StructureChangeInterface.php @@ -8,20 +8,16 @@ interface StructureChangeInterface { /** * Returns table name of the change. - * @return string */ public function getTable(): string; /** * Returns method of the change. - * @return string */ public function getMethod(): string; /** * Returns value of the change based on the method. - * @param string|null $schema - * @param string|null $engineVersion * @return mixed Change value */ public function getValue(string $schema = null, string $engineVersion = null); diff --git a/src/table/StructureInterface.php b/src/table/StructureInterface.php index db020cc..5919a95 100644 --- a/src/table/StructureInterface.php +++ b/src/table/StructureInterface.php @@ -8,31 +8,26 @@ interface StructureInterface { /** * Returns name of the structure. - * @return string */ public function getName(): string; /** * Returns primary key of the structure. - * @return PrimaryKeyInterface|null */ public function getPrimaryKey(): ?PrimaryKeyInterface; /** * Sets primary key of the structure. - * @param PrimaryKeyInterface|null $primaryKey */ public function setPrimaryKey(?PrimaryKeyInterface $primaryKey): void; /** * Adds column to the structure. - * @param ColumnInterface $column */ public function addColumn(ColumnInterface $column): void; /** * Removes column from the structure. - * @param string $name */ public function removeColumn(string $name): void; @@ -44,8 +39,6 @@ public function getColumns(): array; /** * Returns column of given name of the structure. - * @param string $name - * @return ColumnInterface|null */ public function getColumn(string $name): ?ColumnInterface; @@ -57,26 +50,21 @@ public function getForeignKeys(): array; /** * Returns foreign key of given name of the structure. - * @param string $name - * @return ForeignKeyInterface|null */ public function getForeignKey(string $name): ?ForeignKeyInterface; /** * Adds foreign key to the structure. - * @param ForeignKeyInterface $foreignKey */ public function addForeignKey(ForeignKeyInterface $foreignKey): void; /** * Removes foreign key from the structure. - * @param string $name */ public function removeForeignKey(string $name): void; /** * Adds index to the structure. - * @param IndexInterface $index */ public function addIndex(IndexInterface $index): void; @@ -88,14 +76,11 @@ public function getIndexes(): array; /** * Returns index of given name of the structure. - * @param string $name - * @return IndexInterface|null */ public function getIndex(string $name): ?IndexInterface; /** * Removes index from the structure. - * @param string $name */ public function removeIndex(string $name): void; } diff --git a/src/table/TextColumn.php b/src/table/TextColumn.php index 5f60842..b5aa4f8 100644 --- a/src/table/TextColumn.php +++ b/src/table/TextColumn.php @@ -13,8 +13,6 @@ final class TextColumn extends Column implements ColumnInterface /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -25,8 +23,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -38,7 +34,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/TimeColumn.php b/src/table/TimeColumn.php index e057593..5ab6843 100644 --- a/src/table/TimeColumn.php +++ b/src/table/TimeColumn.php @@ -14,9 +14,6 @@ final class TimeColumn extends Column implements ColumnInterface /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be 5.6.4 or newer. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -29,8 +26,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -41,8 +36,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -53,7 +46,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/TimestampColumn.php b/src/table/TimestampColumn.php index 76a0d74..11ffd92 100644 --- a/src/table/TimestampColumn.php +++ b/src/table/TimestampColumn.php @@ -29,8 +29,6 @@ public function setDefault($default): void /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be 5.6.4 or newer. - * @param string|null $schema - * @param string|null $engineVersion * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool @@ -44,8 +42,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -56,8 +52,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -68,7 +62,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string { diff --git a/src/table/TinyIntegerColumn.php b/src/table/TinyIntegerColumn.php index 4450440..490294b 100644 --- a/src/table/TinyIntegerColumn.php +++ b/src/table/TinyIntegerColumn.php @@ -14,9 +14,6 @@ final class TinyIntegerColumn extends Column implements ColumnInterface /** * Checks if schema supports length for this column. * In case of MySQL the engine version must be lower than 8.0.17. - * @param string|null $schema - * @param string|null $engineVersion - * @return bool */ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool { @@ -29,8 +26,6 @@ private function isSchemaLengthSupporting(?string $schema, ?string $engineVersio /** * Returns length of the column. - * @param string|null $schema - * @param string|null $engineVersion * @return int|string|null */ public function getLength(string $schema = null, string $engineVersion = null) @@ -50,8 +45,6 @@ public function getLength(string $schema = null, string $engineVersion = null) /** * Sets length of the column. * @param string|int|null $value - * @param string|null $schema - * @param string|null $engineVersion */ public function setLength($value, string $schema = null, string $engineVersion = null): void { @@ -66,7 +59,6 @@ public function setLength($value, string $schema = null, string $engineVersion = /** * Returns default column definition. - * @return string */ public function getDefinition(): string {