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

Notifier   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 20
c 0
b 0
f 0
wmc 1
lcom 1
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A notify() 0 7 1
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
}