Notifier::send()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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