Subscription::redirect()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: igor
5
 * Date: 17/06/18
6
 * Time: 12:08
7
 */
8
9
namespace AdminWeb\PayerPagSeguro;
10
11
use AdminWeb\Payer\EnvInterface;
12
use AdminWeb\Payer\Subscription as SubscriptionBase;
13
use AdminWeb\PayerPagSeguro\Payment\Redirect;
14
15
class Subscription extends SubscriptionBase
16
{
17
18
    public function redirect()
19
    {
20
        $env = app()->make(EnvInterface::class);
21
        $redirect = new Redirect($env);
22
        $redirect->setItems($this->getItem());
23
        $redirect->setReference($this->reference_id);
0 ignored issues
show
Bug Best Practice introduced by
The property $reference_id is declared private in AdminWeb\Payer\Subscription. Since you implement __get, consider adding a @property or @property-read.
Loading history...
24
        return $redirect->getLink();
25
    }
26
}