Passed
Push — master ( f881c5...014efc )
by Leo
02:57
created

State   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMandatoryFields() 0 5 1
1
<?php
2
3
namespace leocata\M1\Methods\Response;
4
5
use leocata\M1\Methods\StateMethods;
6
7
/**
8
 * Class State
9
 * Notification of user’s status modification
10
 * @package leocata\M1\Methods
11
 */
12
class State extends StateMethods
13
{
14
    /**
15
     * User identifier.
16
     * If client receive message with it’s own userid, he should pass into the indicated status.
17
     * (used to activate the status "away" for the parallel-registered clients)
18
     * @var string
19
     */
20
    public $userid;
21
22
    /**
23
     *
24
     * @return array
25
     */
26
    public function getMandatoryFields(): array
27
    {
28
        $fields = array_merge(parent::getMandatoryFields(), ['userid']);
29
30
        return $fields;
31
    }
32
}
33