Completed
Pull Request — master (#37)
by Vitaliy
30:07 queued 26:47
created

UserSearchMessage::getUserPublicId()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

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