| Total Complexity | 5 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 16 | class AvailableForField implements FieldInterface |
||
| 17 | { |
||
| 18 | public $name = 'available_for'; |
||
| 19 | |||
| 20 | public function canBeSelected() |
||
| 21 | { |
||
| 22 | return false; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function isApplicable($key) |
||
| 26 | { |
||
| 27 | return strcasecmp($this->name, $key) === 0; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | public function getName() |
||
| 34 | { |
||
| 35 | return $this->name; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function buildCondition($key, $value) |
||
| 59 | } |
||
| 60 | } |
||
| 61 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: