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