Test Failed
Push — master ( abd8b8...6c12a5 )
by Hirofumi
55:29
created

Notifier::notify()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Shippinno\Notification\Domain\Model;
4
5
trait Notifier
6
{
7
    /**
8
     * @var TemplateNotificationFactory
9
     */
10
    protected $factory;
11
12
    /**
13
     * @var NotificationRepository
14
     */
15
    protected $notificationRepository;
16
17
    protected function notify(
18
        Destination $destination,
19
        DeduplicationKey $deduplicationKey
20
    ) {
21
        $notification = $this->factory->createFromTemplate($n, $v, $destination, $deduplicationKey);
0 ignored issues
show
Bug introduced by
The variable $n does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
Bug introduced by
The variable $v does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
22
        $this->notificationRepository->add($notification);
23
    }
24
}