Completed
Push — master ( f7d62f...5e8002 )
by Matt
02:53
created

ARBUpdateSubscriptionRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 18
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A attachData() 0 4 1
1
<?php
2
3
namespace CommerceGuys\AuthNet;
4
5
use GuzzleHttp\Client;
6
use CommerceGuys\AuthNet\DataTypes\Subscription;
7
use CommerceGuys\AuthNet\Request\RequestInterface;
8
9
/**
10
 * Use this method to update subscriptions using Automated Recurring Billing.
11
 */
12
class ARBUpdateSubscriptionRequest extends ARBCreateSubscriptionRequest
13
{
14
    protected $subscriptionId;
15
16
    public function __construct(
17
        Configuration $configuration,
18
        Client $client,
19
        $subscriptionId
20
    ) {
21
        parent::__construct($configuration, $client);
22
        $this->subscriptionId = $subscription;
0 ignored issues
show
Bug introduced by
The variable $subscription does not exist. Did you mean $subscriptionId?

This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.

The variable may have been renamed without also renaming all references.

Loading history...
23
    }
24
25
    protected function attachData(RequestInterface $request)
26
    {
27
        $request->addData('subscriptionId', $this->subscriptionId);
28
    }
29
}
30