Invoice   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethodName() 0 3 1
A getPaymentData() 0 6 1
A getPaymentTransferObject() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Ratepay\Business\Request\Payment\Method;
9
10
use Generated\Shared\Transfer\QuoteTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\QuoteTransfer 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...
11
use Generated\Shared\Transfer\RatepayPaymentInvoiceTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...yPaymentInvoiceTransfer 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...
12
use SprykerEco\Shared\Ratepay\RatepayConfig;
13
14
class Invoice extends AbstractMethod
15
{
16
    /**
17
     * @return string
18
     */
19
    public function getMethodName()
20
    {
21
        return RatepayConfig::INVOICE;
22
    }
23
24
    /**
25
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
26
     *
27
     * @return \Generated\Shared\Transfer\RatepayPaymentInvoiceTransfer
28
     */
29
    public function getPaymentData(QuoteTransfer $quoteTransfer)
30
    {
31
        return $quoteTransfer->requirePayment()
32
            ->getPayment()
33
            ->requireRatepayInvoice()
34
            ->getRatepayInvoice();
35
    }
36
37
    /**
38
     * @param \Orm\Zed\Ratepay\Persistence\SpyPaymentRatepay $payment
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Ratepay\Persistence\SpyPaymentRatepay 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...
39
     *
40
     * @return \Generated\Shared\Transfer\RatepayPaymentInvoiceTransfer
41
     */
42
    protected function getPaymentTransferObject($payment)
43
    {
44
        return new RatepayPaymentInvoiceTransfer();
45
    }
46
}
47