Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
15 | public function creating(Model $model) |
||
16 | { |
||
17 | $createdBy = $model->getCreatedByColumn(); |
||
18 | $updatedBy = $model->getUpdatedByColumn(); |
||
19 | |||
20 | if (! $model->$createdBy) { |
||
21 | $model->$createdBy = $this->getAuthenticatedUserId(); |
||
22 | } |
||
23 | |||
24 | if (! $model->$updatedBy) { |
||
25 | $model->$updatedBy = $this->getAuthenticatedUserId(); |
||
26 | } |
||
27 | } |
||
28 | |||
68 |