Completed
Push — master ( 2a18cf...56a686 )
by Oleksandr
14s queued 11s
created

PaypalDebitSubForm::getProviderName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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\Yves\Heidelpay\Form;
9
10
use Generated\Shared\Transfer\HeidelpayPaymentTransfer;
1 ignored issue
show
Bug introduced by
The type Generated\Shared\Transfer\HeidelpayPaymentTransfer 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 Spryker\Yves\StepEngine\Dependency\Form\AbstractSubFormType;
12
use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface;
13
use Spryker\Yves\StepEngine\Dependency\Form\SubFormProviderNameInterface;
14
use SprykerEco\Shared\Heidelpay\HeidelpayConfig;
15
use Symfony\Component\OptionsResolver\OptionsResolver;
16
17
class PaypalDebitSubForm extends AbstractSubFormType implements SubFormInterface, SubFormProviderNameInterface
18
{
19
    protected const PAYMENT_METHOD_TEMPLATE_PATH = 'paypal-debit';
20
21
    /**
22
     * @return string
23
     */
24
    public function getProviderName(): string
25
    {
26
        return HeidelpayConfig::PROVIDER_NAME;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getName(): string
33
    {
34
        return HeidelpayConfig::PAYMENT_METHOD_PAYPAL_DEBIT;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getPropertyPath(): string
41
    {
42
        return HeidelpayConfig::PAYMENT_METHOD_PAYPAL_DEBIT;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getTemplatePath(): string
49
    {
50
        return HeidelpayConfig::PROVIDER_NAME . DIRECTORY_SEPARATOR . static::PAYMENT_METHOD_TEMPLATE_PATH;
51
    }
52
53
    /**
54
     * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver
55
     *
56
     * @return void
57
     */
58
    public function configureOptions(OptionsResolver $resolver): void
59
    {
60
        $resolver->setDefaults([
61
            'data_class' => HeidelpayPaymentTransfer::class,
62
        ])->setRequired(static::OPTIONS_FIELD_NAME);
63
    }
64
}
65