Passed
Pull Request — master (#74)
by oleksandr
11:39
created

CashOnDeliverySubForm::getTemplatePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
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\Payone\Form;
9
10
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...
11
use Generated\Shared\Transfer\PayonePaymentCashOnDeliveryTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...tCashOnDeliveryTransfer 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 Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface;
13
use Symfony\Component\OptionsResolver\OptionsResolver;
14
15
/**
16
 * @method \SprykerEco\Yves\Payone\PayoneConfig getConfig()
17
 */
18
class CashOnDeliverySubForm extends AbstractPayoneSubForm
19
{
20
    /**
21
     * @var string
22
     */
23
    public const PAYMENT_METHOD = 'cash_on_delivery';
24
25
    /**
26
     * @return string
27
     */
28
    public function getName(): string
29
    {
30
        return PaymentTransfer::PAYONE_CASH_ON_DELIVERY;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getPropertyPath(): string
37
    {
38
        return PaymentTransfer::PAYONE_CASH_ON_DELIVERY;
39
    }
40
41
    /**
42
     * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver
43
     *
44
     * @return void
45
     */
46
    public function configureOptions(OptionsResolver $resolver): void
47
    {
48
        $resolver->setDefaults([
49
            'data_class' => PayonePaymentCashOnDeliveryTransfer::class,
50
        ])->setRequired(SubFormInterface::OPTIONS_FIELD_NAME);
51
    }
52
53
    /**
54
     * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver
55
     *
56
     * @return void
57
     */
58
    public function setDefaultOptions(OptionsResolver $resolver): void
59
    {
60
        $this->configureOptions($resolver);
61
    }
62
}
63