QuoteToCallConverter::convert()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 7
rs 10
c 1
b 0
f 0
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\AfterPay\Communication\Converter;
9
10
use Generated\Shared\Transfer\AfterPayCallTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\AfterPayCallTransfer 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\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...
12
13
/**
14
 * @deprecated Use {@link \SprykerEco\Zed\AfterPay\Business\Mapper\AfterPayMapper} instead.
15
 */
16
class QuoteToCallConverter implements QuoteToCallConverterInterface
0 ignored issues
show
Deprecated Code introduced by
The interface SprykerEco\Zed\AfterPay\...oCallConverterInterface has been deprecated: Use {@link \SprykerEco\Zed\AfterPay\Business\Mapper\AfterPayMapperInterface} instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

16
class QuoteToCallConverter implements /** @scrutinizer ignore-deprecated */ QuoteToCallConverterInterface

This interface has been deprecated. The supplier of the interface has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.

Loading history...
17
{
18
    /**
19
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
20
     *
21
     * @return \Generated\Shared\Transfer\AfterPayCallTransfer
22
     */
23
    public function convert(QuoteTransfer $quoteTransfer): AfterPayCallTransfer
24
    {
25
        return (new AfterPayCallTransfer())
26
            ->fromArray($quoteTransfer->toArray(), true)
27
            ->setIdSalesOrder($quoteTransfer->getPayment()->getIdSalesOrder())
28
            ->setEmail($quoteTransfer->getCustomer()->getEmail())
29
            ->setPaymentMethod($quoteTransfer->getPayment()->getPaymentSelection());
30
    }
31
}
32