| Total Complexity | 5 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 72.72% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class LikeCondition extends SimpleCondition |
||
| 13 | { |
||
| 14 | protected $escapingReplacements = null; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return array|bool|null |
||
| 18 | */ |
||
| 19 | 167 | public function getEscapingReplacements() |
|
| 20 | { |
||
| 21 | 167 | return $this->escapingReplacements; |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * This method allows to specify how to escape special characters in the value(s). |
||
| 26 | * |
||
| 27 | * @param array|bool|null an array of mappings from the special characters to their escaped counterparts. |
||
| 28 | * You may use `false` or an empty array to indicate the values are already escaped and no escape should be applied. |
||
| 29 | * Note that when using an escape mapping (or the third operand is not provided), the values will be automatically |
||
| 30 | * enclosed within a pair of percentage characters. |
||
| 31 | */ |
||
| 32 | public function setEscapingReplacements($escapingReplacements): void |
||
| 33 | { |
||
| 34 | $this->escapingReplacements = $escapingReplacements; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | * |
||
| 40 | * @throws InvalidArgumentException if wrong number of operands have been given. |
||
| 41 | */ |
||
| 42 | 127 | public static function fromArrayDefinition(string $operator, array $operands): self |
|
| 55 | } |
||
| 56 | } |
||
| 57 |