| Total Complexity | 8 |
| Total Lines | 99 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | abstract class AbstractExpr implements ExprInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string|null |
||
| 14 | */ |
||
| 15 | protected $relation; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $column; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var mixed |
||
| 24 | */ |
||
| 25 | protected $value; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $expression; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | protected $operator; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * AbstractExpr constructor. |
||
| 39 | * |
||
| 40 | * @param string|null $relation |
||
| 41 | * @param string $column |
||
| 42 | * @param mixed $value |
||
| 43 | */ |
||
| 44 | public function __construct(?string $relation, string $column, $value) |
||
| 45 | { |
||
| 46 | $this->relation = $relation; |
||
| 47 | $this->column = $column; |
||
| 48 | $this->value = $value; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @inheritdoc |
||
| 53 | */ |
||
| 54 | public function getRelation(): ?string |
||
| 55 | { |
||
| 56 | return $this->relation; |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @inheritdoc |
||
| 61 | */ |
||
| 62 | public function getColumn(): string |
||
| 63 | { |
||
| 64 | return $this->column; |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @inheritdoc |
||
| 69 | */ |
||
| 70 | public function getValue() |
||
| 71 | { |
||
| 72 | return $this->value; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @inheritdoc |
||
| 77 | */ |
||
| 78 | public function setExpression(string $expression = null): self |
||
| 79 | { |
||
| 80 | $this->expression = $expression; |
||
| 81 | |||
| 82 | return $this; |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @inheritdoc |
||
| 87 | */ |
||
| 88 | public function getExpression(): string |
||
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @inheritdoc |
||
| 95 | */ |
||
| 96 | public function setOperator(string $operator = null): self |
||
| 101 | } |
||
| 102 | |||
| 103 | /** |
||
| 104 | * @inheritdoc |
||
| 105 | */ |
||
| 106 | public function getOperator(): string |
||
| 109 | } |
||
| 110 | } |
||
| 111 |