Passed
Pull Request — master (#45)
by
unknown
03:36
created

PayuCeeSingleSubForm::configureOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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