Transport::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Communicator (https://github.com/waltertamboer/communicator)
4
 *
5
 * @link https://github.com/waltertamboer/communicator for the canonical source repository
6
 * @copyright Copyright (c) 2017 Communicator (https://github.com/waltertamboer/communicator)
7
 * @license https://github.com/waltertamboer/communicator/blob/master/LICENSE.md MIT
8
 */
9
10
namespace Communicator\Transport\Noop;
11
12
use Communicator\Message;
13
use Communicator\Transport\TransportInterface;
14
15
/**
16
 * A no-operation transport.
17
 */
18
final class Transport implements TransportInterface
19
{
20
    /**
21
     * @var int
22
     */
23
    public $counter;
24
25
    /**
26
     * Initializes a new instance of this class.
27
     */
28
    public function __construct()
29
    {
30
        $this->counter = 0;
31
    }
32
33
    /**
34
     * Sends the message.
35
     *
36
     * @param array $recipients A list with all recipients that should receive the message.
37
     * @param Message $message The message to send.
38
     * @return void
39
     */
40
    public function send(array $recipients, Message $message): void
41
    {
42
        $this->counter++;
43
    }
44
}
45