code cleanup
This commit is contained in:
@@ -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; }
|
||||
|
||||
}
|
||||
@@ -10,5 +10,5 @@ class CondAnd extends Condition {
|
||||
$this->conditions = $conditions;
|
||||
}
|
||||
|
||||
public function getConditions() { return $this->conditions; }
|
||||
public function getConditions(): array { return $this->conditions; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -10,5 +10,5 @@ class CondNull extends Condition {
|
||||
$this->column = $col;
|
||||
}
|
||||
|
||||
public function getColumn() { return $this->column; }
|
||||
public function getColumn(): string { return $this->column; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user