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

SendMultiple::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
c 2
b 1
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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