Skip to content

Commit

Permalink
Fixed compatibility with PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
janpecha committed Jan 6, 2021
1 parent eb60e9b commit 67a82a6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']

fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion src/Statements/AddForeignKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AddForeignKey implements IStatement
* @param string
* @param string[]|string
*/
public function __construct($name, $columns = [], $targetTable, $targetColumns = [])
public function __construct($name, $columns, $targetTable, $targetColumns)
{
$this->definition = new ForeignKeyDefinition($name, $columns, $targetTable, $targetColumns);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Statements/AddIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AddIndex implements IStatement
* @param string|NULL
* @param string
*/
public function __construct($name = NULL, $type)
public function __construct($name, $type)
{
$this->definition = new IndexDefinition($name, $type);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Statements/AlterTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function modifyColumn($name, $type, array $parameters = NULL, array $opti
* @param string
* @return AddIndex
*/
public function addIndex($name = NULL, $type)
public function addIndex($name, $type)
{
return $this->statements[] = new AddIndex($name, $type);
}
Expand All @@ -96,7 +96,7 @@ public function dropIndex($index)
* @param string[]|string
* @return AddForeignKey
*/
public function addForeignKey($name, $columns = [], $targetTable, $targetColumns = [])
public function addForeignKey($name, $columns, $targetTable, $targetColumns)
{
return $this->statements[] = new AddForeignKey($name, $columns, $targetTable, $targetColumns);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Statements/CreateTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function addIndex($name, $type)
* @param string[]|string
* @return ForeignKeyDefinition
*/
public function addForeignKey($name, $columns = [], $targetTable, $targetColumns = [])
public function addForeignKey($name, $columns, $targetTable, $targetColumns)
{
if (isset($this->foreignKeys[$name])) {
throw new DuplicateException("Foreign key '$name' already exists.");
Expand Down
2 changes: 1 addition & 1 deletion src/Statements/ForeignKeyDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ForeignKeyDefinition implements IStatement
* @param string
* @param string[]|string
*/
public function __construct($name, $columns = [], $targetTable, $targetColumns = [])
public function __construct($name, $columns, $targetTable, $targetColumns)
{
$this->name = $name;
$this->targetTable = $targetTable;
Expand Down
2 changes: 1 addition & 1 deletion src/Statements/IndexDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class IndexDefinition implements IStatement
* @param string|NULL
* @param string
*/
public function __construct($name = NULL, $type)
public function __construct($name, $type)
{
$this->name = $name;
$this->setType($type);
Expand Down

0 comments on commit 67a82a6

Please sign in to comment.