| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class NotSame extends AbstractCompareValidator |
||
| 6 | { |
||
| 7 | const E_SAME = 'same'; |
||
| 8 | |||
| 9 | protected $messages = [ |
||
| 10 | self::E_SAME => 'The given value is same with compared value.' |
||
| 11 | ]; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Set compared value |
||
| 15 | * |
||
| 16 | * @param $value |
||
| 17 | * |
||
| 18 | * @return $this |
||
| 19 | */ |
||
| 20 | 6 | public function notSameAs($value) |
|
| 21 | { |
||
| 22 | 6 | $this->options['compared_value'] = $value; |
|
| 23 | |||
| 24 | 6 | return $this; |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritdoc |
||
| 29 | */ |
||
| 30 | 5 | protected function compare() |
|
| 39 | } |
||
| 40 | } |
||
| 41 |