Completed
Pull Request — master (#26)
by
unknown
15:31 queued 04:31
created

GetPinCodeMessage::getDRM()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
crap 2
1
<?php
2
3
namespace Xsolla\SDK\Webhook\Message;
4
5
class GetPinCodeMessage extends Message
6
{
7
    /**
8
     * @return array
9
     */
10 2
    public function getPinCode()
11
    {
12 2
        if (!array_key_exists('pin_code', $this->request)) {
13 1
            return array();
14
        }
15
16 1
        return $this->request['pin_code'];
17
    }
18
19
    /**
20
     * @return string
21
     */
22 2
    public function getDigitalContent()
23
    {
24 2
        if (!array_key_exists('pin_code', $this->request)) {
25 1
            return;
26
        }
27
28 1
        return $this->request['pin_code']['digital_content'];
29
    }
30
31
    /**
32
     * @return string
33
     */
34 2
    public function getDRM()
35
    {
36 2
        if (!array_key_exists('pin_code', $this->request)) {
37 1
            return;
38
        }
39
40 1
        return $this->request['pin_code']['DRM'];
41
    }
42
}
43