Skip to content

Commit

Permalink
Removed unnecessary docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizley committed Sep 5, 2023
1 parent 196d567 commit f253da8
Show file tree
Hide file tree
Showing 72 changed files with 6 additions and 818 deletions.
2 changes: 0 additions & 2 deletions src/Arranger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
40 changes: 0 additions & 40 deletions src/Comparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
{
Expand All @@ -451,11 +428,7 @@ private function removeExcessivePrimaryKeyStatements(BlueprintInterface $bluepri

/**
* Checks whether the separate primary key needs to be added.
* @param BlueprintInterface $blueprint
* @param array<string> $differentColumns
* @param int $newColumnsCount
* @param string|null $schema
* @return bool
*/
private function shouldPrimaryKeyBeAdded(
BlueprintInterface $blueprint,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
{
Expand All @@ -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<string|bool|null>
*/
private function stripAppend(?string $append): array
Expand Down Expand Up @@ -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
{
Expand All @@ -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
{
Expand All @@ -683,7 +644,6 @@ private function isLengthSame($newLength, $oldLength): bool
/**
* Returns values as strings.
* @param mixed $value
* @return string
*/
private function stringifyValue($value): string
{
Expand Down
5 changes: 0 additions & 5 deletions src/ComparatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 0 additions & 2 deletions src/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function __construct(Connection $db, bool $experimental = false)

/**
* Extracts migration data structures.
* @param string $migration
* @param string[] $migrationPaths
* @throws ErrorException
*/
Expand All @@ -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
*/
Expand Down
1 change: 0 additions & 1 deletion src/ExtractorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ interface ExtractorInterface
{
/**
* Extracts migration data structures.
* @param string $migration
* @param array<string> $migrationPaths
* @throws ErrorException
*/
Expand Down
15 changes: 0 additions & 15 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function __construct(

/**
* Returns the translated alias of create table migration template.
* @return string
*/
public function getCreateTableMigrationTemplate(): string
{
Expand All @@ -45,7 +44,6 @@ public function getCreateTableMigrationTemplate(): string

/**
* Returns the translated alias of create foreign keys migration template.
* @return string
*/
public function getCreateForeignKeysMigrationTemplate(): string
{
Expand All @@ -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
{
Expand All @@ -66,13 +62,7 @@ private function getNormalizedNamespace(?string $namespace): ?string

/**
* Generates migration for the table.
* @param string $tableName
* @param string $migrationName
* @param array<string> $referencesToPostpone
* @param bool $usePrefix
* @param string $dbPrefix
* @param string|null $namespace
* @return string
* @throws TableMissingException
* @throws NotSupportedException
*/
Expand Down Expand Up @@ -120,11 +110,6 @@ public function getSuppressedForeignKeys(): array
/**
* Generates the migration for the foreign keys.
* @param array<ForeignKeyInterface> $foreignKeys
* @param string $migrationName
* @param bool $usePrefix
* @param string $dbPrefix
* @param string|null $namespace
* @return string
*/
public function generateForForeignKeys(
array $foreignKeys,
Expand Down
11 changes: 0 additions & 11 deletions src/GeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ interface GeneratorInterface
{
/**
* Generates migration for the table.
* @param string $tableName
* @param string $migrationName
* @param array<string> $referencesToPostpone
* @param bool $usePrefix
* @param string $dbPrefix
* @param string|null $namespace
* @return string
* @throws TableMissingException
* @throws NotSupportedException
*/
Expand All @@ -33,11 +27,6 @@ public function generateForTable(
/**
* Generates the migration for the foreign keys.
* @param array<ForeignKeyInterface> $foreignKeys
* @param string $migrationName
* @param bool $usePrefix
* @param string $dbPrefix
* @param string|null $namespace
* @return string
*/
public function generateForForeignKeys(
array $foreignKeys,
Expand Down
2 changes: 0 additions & 2 deletions src/HistoryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ private function createTable(): void

/**
* Adds migration history entry.
* @param string $migrationName
* @param string|null $namespace
* @throws Exception
* @throws NotSupportedException
*/
Expand Down
2 changes: 0 additions & 2 deletions src/HistoryManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ interface HistoryManagerInterface
{
/**
* Adds migration history entry.
* @param string $migrationName
* @param string|null $namespace
* @throws Exception
* @throws NotSupportedException
*/
Expand Down
5 changes: 0 additions & 5 deletions src/Inspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,8 @@ public function __construct(

/**
* Prepares a blueprint for the upcoming update.
* @param StructureInterface $newStructure
* @param bool $onlyShow
* @param array<string> $migrationsToSkip
* @param array<string> $migrationPaths
* @param string|null $schema
* @param string|null $engineVersion
* @return BlueprintInterface
* @throws InvalidConfigException
* @throws ErrorException
* @throws NotSupportedException
Expand Down
5 changes: 0 additions & 5 deletions src/InspectorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ interface InspectorInterface
{
/**
* Prepares a blueprint for the upcoming update.
* @param StructureInterface $newStructure
* @param bool $onlyShow
* @param array<string> $migrationsToSkip
* @param array<string> $migrationPaths
* @param string|null $schema
* @param string|null $engineVersion
* @return BlueprintInterface
* @throws InvalidConfigException
* @throws ErrorException
* @throws NotSupportedException
Expand Down
10 changes: 0 additions & 10 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand Down
5 changes: 0 additions & 5 deletions src/SqlColumnMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class SqlColumnMapper
private $schema = [];

/**
* @param string $definition
* @param array<string, string> $typeMap
*/
private function __construct(string $definition, array $typeMap)
Expand All @@ -38,7 +37,6 @@ private function __construct(string $definition, array $typeMap)
}

/**
* @param string $definition
* @param array<string, string> $typeMap
* @return array<string, mixed>
*/
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/SqlExtractorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface SqlExtractorInterface extends ExtractorInterface
{
/**
* Extracts migration SQL statements.
* @param string $migration
* @param array<string> $migrationPaths
* @throws ErrorException
*/
Expand Down
Loading

0 comments on commit f253da8

Please sign in to comment.