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

CreateSubscriptionMessage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 22
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscription() 0 4 1
A getCoupon() 0 8 2
1
<?php
2
3
namespace Xsolla\SDK\Webhook\Message;
4
5
class CreateSubscriptionMessage extends CancelSubscriptionMessage
6
{
7
    /**
8
     * @return array
9
     */
10 1
    public function getSubscription()
11
    {
12 1
        return $this->request['subscription'];
13
    }
14
15
    /**
16
     * @return array
17
     */
18 1
    public function getCoupon()
19
    {
20 1
        if (!array_key_exists('coupon', $this->request)) {
21
            return array();
22
        }
23
24 1
        return $this->request['coupon'];
25
    }
26
}
27