Passed
Push — master ( a30cf1...9051a7 )
by Gabriel
14:38
created

PurchaseRequest::initialize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace ByTIC\Payments\Gateways\Providers\Stripe\Message;
4
5
use Omnipay\Stripe\Message\PaymentIntents\PurchaseRequest as AbstractRequest;
0 ignored issues
show
Bug introduced by
The type Omnipay\Stripe\Message\P...Intents\PurchaseRequest was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use ByTIC\Payments\Gateways\Providers\Librapay\Helper;
7
8
/**
9
 * Class PurchaseResponse
10
 * @package ByTIC\Payments\Gateways\Providers\Stripe\Message
11
 */
12
class PurchaseRequest extends AbstractRequest
13
{
14
    /**
15
     * @inheritdoc
16
     */
17
    public function initialize(array $parameters = [])
18
    {
19
        if (!isset($parameters['paymentMethod'])) {
20
            $parameters['paymentMethod'] = 'card';
21
        }
22
23
        return parent::initialize($parameters);
24
    }
25
}
26