Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | public function bootEmailsTrait() |
||
19 | { |
||
20 | static::creating(function (Event $event) { |
||
21 | /** @var EmailTrait|Record $record */ |
||
22 | $record = $event->getRecord(); |
||
23 | /** @var static|RecordManager $manager */ |
||
24 | |||
25 | $record->setIfEmpty('sent', 'no'); |
||
26 | $record->setIfEmpty('compressed', 'no'); |
||
27 | |||
28 | $record->saveMergeTagsToDbField(); |
||
29 | }); |
||
32 |