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

@@ -8,14 +8,14 @@ class Compare extends Condition {
private string $column;
private $value;
public function __construct($col, $val, $operator='=') {
public function __construct(string $col, $val, string $operator = '=') {
$this->operator = $operator;
$this->column = $col;
$this->value = $val;
}
public function getColumn() { return $this->column; }
public function getColumn(): string { return $this->column; }
public function getValue() { return $this->value; }
public function getOperator() { return $this->operator; }
public function getOperator(): string { return $this->operator; }
}

View File

@@ -10,5 +10,5 @@ class CondAnd extends Condition {
$this->conditions = $conditions;
}
public function getConditions() { return $this->conditions; }
public function getConditions(): array { return $this->conditions; }
}

View File

@@ -12,6 +12,6 @@ class CondIn extends Condition {
$this->expression = $expression;
}
public function getColumn() { return $this->column; }
public function getColumn(): string { return $this->column; }
public function getExpression() { return $this->expression; }
}

View File

@@ -8,7 +8,7 @@ abstract class CondKeyword extends Condition {
private $rightExpression;
private string $keyword;
public function __construct($keyword, $leftExpression, $rightExpression) {
public function __construct(string $keyword, $leftExpression, $rightExpression) {
$this->leftExpression = $leftExpression;
$this->rightExpression = $rightExpression;
$this->keyword = $keyword;
@@ -16,5 +16,5 @@ abstract class CondKeyword extends Condition {
public function getLeftExp() { return $this->leftExpression; }
public function getRightExp() { return $this->rightExpression; }
public function getKeyword() { return $this->keyword; }
public function getKeyword(): string { return $this->keyword; }
}

View File

@@ -10,5 +10,5 @@ class CondNull extends Condition {
$this->column = $col;
}
public function getColumn() { return $this->column; }
public function getColumn(): string { return $this->column; }
}

View File

@@ -10,5 +10,5 @@ class CondOr extends Condition {
$this->conditions = (!empty($conditions) && is_array($conditions[0])) ? $conditions[0] : $conditions;
}
public function getConditions() { return $this->conditions; }
public function getConditions(): array { return $this->conditions; }
}