PaymentRequest::send()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Nxmad\Larapay\Requests;
6
7
use Nxmad\Larapay\Units\Redirect;
8
use Nxmad\Larapay\Abstracts\Request;
9
10
class PaymentRequest extends Request
11
{
12
    /**
13
     * @return Redirect
14
     */
15
    public function send()
16
    {
17
        parent::send();
18
19
        if ($this->gateway->config('public')) {
20
            $this->set(Request::PUBLIC, $this->gateway->config('public'));
21
        }
22
23
        return $this->redirect();
24
    }
25
}
26