Completed
Push — master ( 9abbc7...a687e5 )
by Fabrizio
03:03
created

SendMultiple   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 5
Bugs 3 Features 1
Metric Value
wmc 2
c 5
b 3
f 1
lcom 1
cbo 1
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A send() 0 4 1
1
<?php
2
3
namespace Fenos\Notifynder\Senders;
4
5
use Fenos\Notifynder\Contracts\DefaultSender;
6
use Fenos\Notifynder\Contracts\StoreNotification;
7
8
/**
9
 * Class SendMultiple.
10
 *
11
 * Send multiple categories
12
 */
13
class SendMultiple implements DefaultSender
14
{
15
    /**
16
     * @var array
17
     */
18
    protected $infoNotifications = [];
19
20
    /**
21
     * @param $infoNotifications
22
     */
23
    public function __construct($infoNotifications)
24
    {
25
        $this->infoNotifications = $infoNotifications;
26
    }
27
28
    /**
29
     * Send multiple notifications.
30
     *
31
     * @param  StoreNotification $sender
32
     * @return mixed
33
     */
34
    public function send(StoreNotification $sender)
35
    {
36
        return $sender->storeMultiple($this->infoNotifications);
37
    }
38
}
39