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

CreateSubscriptionMessage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 22
ccs 0
cts 11
cp 0
rs 10

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
    public function getSubscription()
11
    {
12
        return $this->request['subscription'];
13
    }
14
15
    /**
16
     * @return array
17
     */
18
    public function getCoupon()
19
    {
20
        if (!array_key_exists('coupon', $this->request)) {
21
            return array();
22
        }
23
24
        return $this->request['coupon'];
25
    }
26
}
27