code cleanup

This commit is contained in:
2021-04-02 21:58:06 +02:00
parent 4a52ab2fd7
commit eea0aeacc6
67 changed files with 472 additions and 425 deletions

View File

@@ -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; }
}