code cleanup
This commit is contained in:
@@ -10,5 +10,5 @@ abstract class Constraint {
|
||||
$this->columnNames = (!is_array($columnNames) ? array($columnNames) : $columnNames);
|
||||
}
|
||||
|
||||
public function getColumnNames() { return $this->columnNames; }
|
||||
public function getColumnNames(): array { return $this->columnNames; }
|
||||
}
|
||||
@@ -10,14 +10,14 @@ class ForeignKey extends Constraint {
|
||||
private string $referencedColumn;
|
||||
private ?Strategy $strategy;
|
||||
|
||||
public function __construct($name, $refTable, $refColumn, $strategy = NULL) {
|
||||
public function __construct(string $name, string $refTable, string $refColumn, ?Strategy $strategy = NULL) {
|
||||
parent::__construct($name);
|
||||
$this->referencedTable = $refTable;
|
||||
$this->referencedColumn = $refColumn;
|
||||
$this->strategy = $strategy;
|
||||
}
|
||||
|
||||
public function getReferencedTable() { return $this->referencedTable; }
|
||||
public function getReferencedColumn() { return $this->referencedColumn; }
|
||||
public function onDelete() { return $this->strategy; }
|
||||
public function getReferencedTable(): string { return $this->referencedTable; }
|
||||
public function getReferencedColumn(): string { return $this->referencedColumn; }
|
||||
public function onDelete(): ?Strategy { return $this->strategy; }
|
||||
}
|
||||
Reference in New Issue
Block a user