Completed
Push — master ( 47cb07...7824e3 )
by Rémi
02:56
created

DefaultMessage::getUsers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace MessageApp\Message;
4
5
use MessageApp\Message;
6
use MessageApp\User\ApplicationUser;
7
8
class DefaultMessage implements Message
9
{
10
    /**
11
     * @var ApplicationUser[]
12
     */
13
    protected $users;
14
15
    /**
16
     * @var string
17
     */
18
    protected $message;
19
20
    /**
21
     * Construct
22
     *
23
     * @param ApplicationUser[] $users
24
     * @param string            $message
25
     */
26 12
    public function __construct(array $users, $message)
27
    {
28 12
        $this->users = $users;
29 12
        $this->message = $message;
30 12
    }
31
32
    /**
33
     * Returns the user the message must be sent to
34
     *
35
     * @return ApplicationUser
36
     */
37 9
    public function getUsers()
38
    {
39 9
        return $this->users;
40
    }
41
42
    /**
43
     * Returns the message
44
     *
45
     * @return string
46
     */
47 3
    public function getMessage()
48
    {
49 3
        return $this->message;
50
    }
51
}
52