Notifier   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 32
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A send() 0 4 1
A getCurrentNotifications() 0 4 1
1
<?php
2
3
namespace Rojtjo\Notifier;
4
5
class Notifier
6
{
7
    /**
8
     * @var Transport
9
     */
10
    private $transport;
11
12
    /**
13
     * @param Transport $transport
14
     */
15 6
    public function __construct(Transport $transport)
16
    {
17 6
        $this->transport = $transport;
18 6
    }
19
20
    /**
21
     * @param Notification $notification
22
     * @return void
23
     */
24 3
    public function send(Notification $notification)
25
    {
26 3
        $this->transport->send($notification);
27 3
    }
28
29
    /**
30
     * @return Notifications
31
     */
32 3
    public function getCurrentNotifications()
33
    {
34 3
        return $this->transport->getCurrentNotifications();
35
    }
36
}
37