Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function check($value): bool |
||
27 | { |
||
28 | $this->requireParameters(['table']); |
||
29 | |||
30 | $table = $this->parameter('table'); |
||
31 | $column = $this->parameter('column'); |
||
32 | $column = $column ?: $this->getAttribute()->getKey(); |
||
33 | |||
34 | $builder = $this->db->table($table)->where($column, $value); |
||
35 | |||
36 | return $builder->count() > 0; |
||
37 | } |
||
39 |