Skip to content

Commit

Permalink
Merge pull request #775 from cakephp/4.x-typos
Browse files Browse the repository at this point in the history
Fix typos.
  • Loading branch information
markstory authored Nov 26, 2024
2 parents e535fc6 + 3fb6652 commit 10620a6
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Command/BakeMigrationDiffCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ protected function getColumns(): void
}

/**
* Calculate the diff between contraints in existing tables.
* This will look for contraints addition, contraints removal and changes in contraints metadata
* Calculate the diff between constraints in existing tables.
* This will look for constraints addition, constraints removal and changes in constraints metadata
* such as change of referenced columns if the old constraints and the new one have the same name.
*
* The method directly sets the diff in a property of the class.
Expand Down
2 changes: 1 addition & 1 deletion src/Command/DumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function extractArgs(Arguments $args): array
public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionParser
{
$parser->setDescription([
'Dumps the current scheam of the database to be used while baking a diff',
'Dumps the current schema of the database to be used while baking a diff',
'',
'<info>migrations dump -c secondary</info>',
])->addOption('plugin', [
Expand Down
2 changes: 1 addition & 1 deletion src/Config/ConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getMigrationPath(): string;
public function getSeedPath(): string;

/**
* Get the connection namee
* Get the connection name
*
* @return string|false
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Db/Adapter/MysqlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ public function getSqlType(Literal|string $type, ?int $limit = null): array
return ['name' => 'varbinary', 'limit' => $limit];
case static::PHINX_TYPE_BLOB:
if ($limit !== null) {
// Rework this part as the choosen types were always UNDER the required length
// Rework this part as the chosen types were always UNDER the required length
$sizes = [
'tinyblob' => static::BLOB_SMALL,
'blob' => static::BLOB_REGULAR,
Expand Down
8 changes: 4 additions & 4 deletions src/Db/Adapter/PhinxAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ protected function convertIndex(PhinxIndex $phinxIndex): Index
*/
protected function convertForeignKey(PhinxForeignKey $phinxKey): ForeignKey
{
$foreignkey = new ForeignKey();
$foreignKey = new ForeignKey();
$attrs = [
'columns', 'referencedColumns', 'onDelete', 'onUpdate', 'constraint',
];
Expand All @@ -212,7 +212,7 @@ protected function convertForeignKey(PhinxForeignKey $phinxKey): ForeignKey
$value = null;
}
if ($value !== null) {
$foreignkey->{$set}($value);
$foreignKey->{$set}($value);
}
}

Expand All @@ -222,10 +222,10 @@ protected function convertForeignKey(PhinxForeignKey $phinxKey): ForeignKey
$referenced = null;
}
if ($referenced) {
$foreignkey->setReferencedTable($this->convertTable($referenced));
$foreignKey->setReferencedTable($this->convertTable($referenced));
}

return $foreignkey;
return $foreignKey;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Db/Adapter/SqlserverAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ protected function getChangeCommentInstructions(Table $table, ?string $newCommen
}

/**
* Gets the SqlServer Column Comment Defininition for a column object.
* Gets the SqlServer column comment definition for a column object.
*
* @param \Migrations\Db\Table\Column $column Column
* @param ?string $tableName Table name
Expand Down Expand Up @@ -625,7 +625,7 @@ protected function getDefaultConstraint(string $tableName, string $columnName):
* @param string $indexId Index ID
* @return array
*/
protected function getIndexColums(string $tableId, string $indexId): array
protected function getIndexColumns(string $tableId, string $indexId): array
{
$sql = "SELECT AC.[name] AS [column_name]
FROM sys.[index_columns] IC
Expand Down Expand Up @@ -659,7 +659,7 @@ public function getIndexes(string $tableName): array

$rows = $this->fetchAll($sql);
foreach ($rows as $row) {
$columns = $this->getIndexColums($row['table_id'], $row['index_id']);
$columns = $this->getIndexColumns($row['table_id'], $row['index_id']);
$indexes[$row['index_name']] = ['columns' => $columns];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Db/Plan/Solver/ActionSplitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ActionSplitter
protected $conflictFilter;

/**
* Comstructor
* Constructor
*
* @param string $conflictClass The fully qualified class name of the Action class to match for conflicts
* @param string $conflictClassDual The fully qualified class name of the Action class to match for conflicts,
Expand All @@ -61,7 +61,7 @@ public function __construct(string $conflictClass, string $conflictClassDual, ca
}

/**
* Returs a sequence of AlterTable instructions that are non conflicting
* Returns a sequence of AlterTable instructions that are non conflicting
* based on the constructor parameters.
*
* @param \Migrations\Db\Plan\AlterTable $alter The collection of actions to inspect
Expand Down
2 changes: 1 addition & 1 deletion src/MigrationsDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Used to register all supported subcommand in order to make
* them executable by the Symfony Console component
*
* @deprecated 4.2.0 Will be removed alongsize phinx
* @deprecated 4.2.0 Will be removed alongside phinx
*/
class MigrationsDispatcher extends Application
{
Expand Down

0 comments on commit 10620a6

Please sign in to comment.