Completed
Push — master ( 646044...5dbf7b )
by Roj
02:47
created

SessionTransport   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

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