Skip to content

Commit 67a82a6

Browse files
committed
Fixed compatibility with PHP 8.0
1 parent eb60e9b commit 67a82a6

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
10+
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
1111

1212
fail-fast: false
1313

src/Statements/AddForeignKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AddForeignKey implements IStatement
2020
* @param string
2121
* @param string[]|string
2222
*/
23-
public function __construct($name, $columns = [], $targetTable, $targetColumns = [])
23+
public function __construct($name, $columns, $targetTable, $targetColumns)
2424
{
2525
$this->definition = new ForeignKeyDefinition($name, $columns, $targetTable, $targetColumns);
2626
}

src/Statements/AddIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AddIndex implements IStatement
1818
* @param string|NULL
1919
* @param string
2020
*/
21-
public function __construct($name = NULL, $type)
21+
public function __construct($name, $type)
2222
{
2323
$this->definition = new IndexDefinition($name, $type);
2424
}

src/Statements/AlterTable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function modifyColumn($name, $type, array $parameters = NULL, array $opti
7373
* @param string
7474
* @return AddIndex
7575
*/
76-
public function addIndex($name = NULL, $type)
76+
public function addIndex($name, $type)
7777
{
7878
return $this->statements[] = new AddIndex($name, $type);
7979
}
@@ -96,7 +96,7 @@ public function dropIndex($index)
9696
* @param string[]|string
9797
* @return AddForeignKey
9898
*/
99-
public function addForeignKey($name, $columns = [], $targetTable, $targetColumns = [])
99+
public function addForeignKey($name, $columns, $targetTable, $targetColumns)
100100
{
101101
return $this->statements[] = new AddForeignKey($name, $columns, $targetTable, $targetColumns);
102102
}

src/Statements/CreateTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function addIndex($name, $type)
7575
* @param string[]|string
7676
* @return ForeignKeyDefinition
7777
*/
78-
public function addForeignKey($name, $columns = [], $targetTable, $targetColumns = [])
78+
public function addForeignKey($name, $columns, $targetTable, $targetColumns)
7979
{
8080
if (isset($this->foreignKeys[$name])) {
8181
throw new DuplicateException("Foreign key '$name' already exists.");

src/Statements/ForeignKeyDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ForeignKeyDefinition implements IStatement
4040
* @param string
4141
* @param string[]|string
4242
*/
43-
public function __construct($name, $columns = [], $targetTable, $targetColumns = [])
43+
public function __construct($name, $columns, $targetTable, $targetColumns)
4444
{
4545
$this->name = $name;
4646
$this->targetTable = $targetTable;

src/Statements/IndexDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class IndexDefinition implements IStatement
2929
* @param string|NULL
3030
* @param string
3131
*/
32-
public function __construct($name = NULL, $type)
32+
public function __construct($name, $type)
3333
{
3434
$this->name = $name;
3535
$this->setType($type);

0 commit comments

Comments
 (0)