Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
18 | public function __construct(array $attributes = []) |
||
19 | { |
||
20 | parent::__construct($attributes); |
||
21 | |||
22 | // Remember to update this if you had fields to the fillable array here |
||
23 | // this is to allow child classes to provide a custom foreign key in fillable |
||
24 | if (count($this->fillable) == 2) { |
||
25 | $this->fillable[] = strtolower(str_replace('Revision', '', get_called_class())) . '_id'; |
||
26 | } |
||
39 |