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

State::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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