| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function __getCondition($value) |
||
| 46 | { |
||
| 47 | 1 | $condition = parent::__getCondition($value); |
|
| 48 | |||
| 49 | 1 | if ($condition === NULL) { |
|
| 50 | 1 | $condition = Condition::setupEmpty(); |
|
| 51 | |||
| 52 | 1 | if (preg_match('/(<>|[<|>]=?)?([-0-9,|.]+)/', $value, $matches)) { |
|
| 53 | 1 | $value = str_replace(',', '.', $matches[2]); |
|
| 54 | 1 | $operator = $matches[1] |
|
| 55 | 1 | ? $matches[1] |
|
| 56 | 1 | : '='; |
|
| 57 | |||
| 58 | 1 | $condition = Condition::setup($this->getColumn(), $operator . ' ?', $value); |
|
| 59 | 1 | } |
|
| 60 | 1 | } |
|
| 61 | |||
| 62 | 1 | return $condition; |
|
| 63 | } |
||
| 64 | } |
||
| 65 |