We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function auditSave() |
||
| 34 | { |
||
| 35 | if (method_exists($this, 'creator' || method_exists($this, 'editor'))) { |
||
| 36 | throw new \Exception("Methods 'creator()' & 'editor()' must exist to use auditSave() in {$this->getMorphClass()}"); |
||
|
|
|||
| 37 | } |
||
| 38 | |||
| 39 | if (!$this->creator) { |
||
| 40 | $this->setAttribute('creator_id', account()->id); |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->setAttribute('editor_id', account()->id); |
||
| 44 | |||
| 45 | return $this->save(); |
||
| 46 | } |
||
| 47 | |||
| 48 | } |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.