Completed
Push — master ( 11f8f0...b6346a )
by
unknown
04:00
created

UserSearchMessage::getUserId()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 1
b 0
f 0
cc 2
eloc 3
nc 2
nop 0
crap 2
1
<?php
2
3
namespace Xsolla\SDK\Webhook\Message;
4
5
class UserSearchMessage extends Message
6
{
7
    /**
8
     * @return string|null
9
     */
10 1
    public function getUserPublicId()
11
    {
12 1
        if (array_key_exists('public_id', $this->request['user'])) {
13 1
            return $this->request['user']['public_id'];
14
        }
15
    }
16
17
    /**
18
     * @return string|null
19
     */
20 2
    public function getUserId()
21
    {
22 2
        if (array_key_exists('id', $this->request['user'])) {
23 1
            return $this->request['user']['id'];
24
        }
25
    }
26
}
27