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

ArrayTransport   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

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