Conditions | 1 |
Paths | 1 |
Total Lines | 4 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Distilleries\Expendable\Models; |
||
54 | public function scopeByElement($query, Model $model) |
||
55 | { |
||
56 | return $query->where($this->getTable() . '.' . $this->getModelColumn(), '=', $model->getTable()) |
||
57 | ->where($this->getTable() . '.' . $this->getIdSourceColumn(), '=', $model->getKey()); |
||
58 | } |
||
61 |