HasEmailDbMessageTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toMailDb() 0 6 1
1
<?php
2
3
namespace ByTIC\Notifications\Notifications;
4
5
use ByTIC\Notifications\Messages\Builder\EmailBuilder;
6
7
/**
8
 * Trait HasEmailDbMessageTrait
9
 * @package ByTIC\Notifications\Notifications
10
 */
11
trait HasEmailDbMessageTrait
12
{
13
    use HasMessageBuilderTrait;
14
15
    /**
16
     * @param $notifiable
17
     * @return mixed
18
     */
19
    public function toMailDb($notifiable)
20
    {
21
        /** @var EmailBuilder $emailBuilder */
22
        $emailBuilder = $this->generateMessageBuilder('mail');
23
        $emailBuilder->setNotifiable($notifiable);
24
        return $emailBuilder->createEmail();
25
    }
26
}
27