CreditCardSubForm   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 8
dl 0
loc 38
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPropertyPath() 0 3 1
A getTemplatePath() 0 3 1
A getName() 0 3 1
A configureOptions() 0 5 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\Yves\Computop\Form;
9
10
use Generated\Shared\Transfer\ComputopCreditCardPaymentTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...editCardPaymentTransfer 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\PaymentTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PaymentTransfer 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\Computop\ComputopConfig;
13
use Symfony\Component\OptionsResolver\OptionsResolver;
14
15
class CreditCardSubForm extends AbstractSubForm
16
{
17
    public const PAYMENT_METHOD = 'credit-card';
18
19
    /**
20
     * @return string
21
     */
22
    public function getName()
23
    {
24
        return PaymentTransfer::COMPUTOP_CREDIT_CARD;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getPropertyPath()
31
    {
32
        return PaymentTransfer::COMPUTOP_CREDIT_CARD;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getTemplatePath()
39
    {
40
        return ComputopConfig::PROVIDER_NAME . '/' . self::PAYMENT_METHOD;
41
    }
42
43
    /**
44
     * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver
45
     *
46
     * @return void
47
     */
48
    public function configureOptions(OptionsResolver $resolver)
49
    {
50
        $resolver->setDefaults([
51
            'data_class' => ComputopCreditCardPaymentTransfer::class,
52
        ])->setRequired(self::OPTIONS_FIELD_NAME);
53
    }
54
}
55