Passed
Push — bugfix/cc-14473-computop-notif... ( a2cfde...beecb7 )
by Michael
03:33
created

SofortSubForm::getPaymentMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
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\ComputopSofortPaymentTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...opSofortPaymentTransfer 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 Symfony\Component\OptionsResolver\OptionsResolver;
13
14
class SofortSubForm extends AbstractSubForm
15
{
16
    /**
17
     * @var string
18
     */
19
    public const PAYMENT_METHOD = 'sofort';
20
21
    /**
22
     * @return string
23
     */
24
    public function getName(): string
25
    {
26
        return PaymentTransfer::COMPUTOP_SOFORT;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getPropertyPath(): string
33
    {
34
        return PaymentTransfer::COMPUTOP_SOFORT;
35
    }
36
37
    /**
38
     * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver
39
     *
40
     * @return void
41
     */
42
    public function configureOptions(OptionsResolver $resolver): void
43
    {
44
        $resolver->setDefaults([
45
            'data_class' => ComputopSofortPaymentTransfer::class,
46
        ])->setRequired(static::OPTIONS_FIELD_NAME);
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    protected function getPaymentMethod(): string
53
    {
54
        return static::PAYMENT_METHOD;
55
    }
56
}
57