Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Illuminate/Database/Schema/Grammars/Grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function compileForeignKeys($schema, $table)
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
* @return list<string>|string
*/
public function compileRenameColumn(Blueprint $blueprint, Fluent $command)
{
Expand All @@ -185,7 +185,7 @@ public function compileRenameColumn(Blueprint $blueprint, Fluent $command)
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
* @return list<string>|string
*
* @throws \RuntimeException
*/
Expand Down Expand Up @@ -427,8 +427,8 @@ protected function hasCommand(Blueprint $blueprint, $name)
* Add a prefix to an array of values.
*
* @param string $prefix
* @param array $values
* @return array
* @param array<string> $values
* @return array<string>
*/
public function prefixArray($prefix, array $values)
{
Expand Down
8 changes: 1 addition & 7 deletions src/Illuminate/Database/Schema/Grammars/MariaDbGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@

class MariaDbGrammar extends MySqlGrammar
{
/**
* Compile a rename column command.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
*/
/** @inheritDoc */
public function compileRenameColumn(Blueprint $blueprint, Fluent $command)
{
if (version_compare($this->connection->getServerVersion(), '10.5.2', '<')) {
Expand Down
24 changes: 6 additions & 18 deletions src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,7 @@ public function compileAutoIncrementStartingValues(Blueprint $blueprint, Fluent
}
}

/**
* Compile a rename column command.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
*/
/** @inheritDoc */
public function compileRenameColumn(Blueprint $blueprint, Fluent $command)
{
$isMaria = $this->connection->isMaria();
Expand Down Expand Up @@ -396,13 +390,7 @@ protected function compileLegacyRenameColumn(Blueprint $blueprint, Fluent $comma
);
}

/**
* Compile a change column command into a series of SQL statements.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
*/
/** @inheritDoc */
public function compileChange(Blueprint $blueprint, Fluent $command)
{
$column = $command->column;
Expand Down Expand Up @@ -650,7 +638,7 @@ public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
/**
* Compile the SQL needed to drop all tables.
*
* @param array $tables
* @param array<string> $tables
* @return string
*/
public function compileDropAllTables($tables)
Expand All @@ -661,7 +649,7 @@ public function compileDropAllTables($tables)
/**
* Compile the SQL needed to drop all views.
*
* @param array $views
* @param array<string> $views
* @return string
*/
public function compileDropAllViews($views)
Expand Down Expand Up @@ -707,8 +695,8 @@ public function compileTableComment(Blueprint $blueprint, Fluent $command)
/**
* Quote-escape the given tables, views, or types.
*
* @param array $names
* @return array
* @param array<string> $names
* @return array<string>
*/
public function escapeNames($names)
{
Expand Down
22 changes: 8 additions & 14 deletions src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,7 @@ public function compileAutoIncrementStartingValues(Blueprint $blueprint, Fluent
}
}

/**
* Compile a change column command into a series of SQL statements.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
*/
/** @inheritDoc */
public function compileChange(Blueprint $blueprint, Fluent $command)
{
$column = $command->column;
Expand Down Expand Up @@ -465,7 +459,7 @@ public function compileDropIfExists(Blueprint $blueprint, Fluent $command)
/**
* Compile the SQL needed to drop all tables.
*
* @param array $tables
* @param array<string> $tables
* @return string
*/
public function compileDropAllTables($tables)
Expand All @@ -476,7 +470,7 @@ public function compileDropAllTables($tables)
/**
* Compile the SQL needed to drop all views.
*
* @param array $views
* @param array<string> $views
* @return string
*/
public function compileDropAllViews($views)
Expand All @@ -487,7 +481,7 @@ public function compileDropAllViews($views)
/**
* Compile the SQL needed to drop all types.
*
* @param array $types
* @param array<string> $types
* @return string
*/
public function compileDropAllTypes($types)
Expand All @@ -498,7 +492,7 @@ public function compileDropAllTypes($types)
/**
* Compile the SQL needed to drop all domains.
*
* @param array $domains
* @param array<string> $domains
* @return string
*/
public function compileDropAllDomains($domains)
Expand Down Expand Up @@ -684,8 +678,8 @@ public function compileTableComment(Blueprint $blueprint, Fluent $command)
/**
* Quote-escape the given tables, views, or types.
*
* @param array $names
* @return array
* @param array<string> $names
* @return array<string>
*/
public function escapeNames($names)
{
Expand Down Expand Up @@ -1231,7 +1225,7 @@ protected function modifyStoredAs(Blueprint $blueprint, Fluent $column)
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $column
* @return string|array|null
* @return string|list<string>|null
*/
protected function modifyGeneratedAs(Blueprint $blueprint, Fluent $column)
{
Expand Down
12 changes: 3 additions & 9 deletions src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function compileAdd(Blueprint $blueprint, Fluent $command)
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
* @return list<string>|string
*/
public function compileAlter(Blueprint $blueprint, Fluent $command)
{
Expand Down Expand Up @@ -370,13 +370,7 @@ public function compileAlter(Blueprint $blueprint, Fluent $command)
], $indexes, [$foreignKeyConstraintsEnabled ? $this->compileEnableForeignKeyConstraints() : null]));
}

/**
* Compile a change column command into a series of SQL statements.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
*/
/** @inheritDoc */
public function compileChange(Blueprint $blueprint, Fluent $command)
{
// Handled on table alteration...
Expand Down Expand Up @@ -526,7 +520,7 @@ public function compileRebuild($schema = null)
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|null
* @return list<string>|null
*/
public function compileDropColumn(Blueprint $blueprint, Fluent $command)
{
Expand Down
18 changes: 3 additions & 15 deletions src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,7 @@ public function compileAdd(Blueprint $blueprint, Fluent $command)
);
}

/**
* Compile a rename column command.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
*/
/** @inheritDoc */
public function compileRenameColumn(Blueprint $blueprint, Fluent $command)
{
return sprintf("sp_rename %s, %s, N'COLUMN'",
Expand All @@ -241,13 +235,7 @@ public function compileRenameColumn(Blueprint $blueprint, Fluent $command)
);
}

/**
* Compile a change column command into a series of SQL statements.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return array|string
*/
/** @inheritDoc */
public function compileChange(Blueprint $blueprint, Fluent $command)
{
return [
Expand Down Expand Up @@ -1033,7 +1021,7 @@ protected function modifyPersisted(Blueprint $blueprint, Fluent $column)
/**
* Quote the given string literal.
*
* @param string|array $value
* @param string|array<string> $value
* @return string
*/
public function quoteString($value)
Expand Down
Loading