getPropertyPath()   A
last analyzed

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
cc 1
eloc 1
c 1
b 0
f 0
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 SprykerEco\Shared\Payone\PayoneApiConstants;
12
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
13
use Symfony\Component\Form\FormBuilderInterface;
14
15
class PostfinanceEfinanceOnlineTransferSubForm extends OnlineTransferSubForm
16
{
17
    public const PAYMENT_METHOD = 'postfinance_efinance_online_transfer';
18
    public const OPTION_BANK_COUNTRIES = 'postfinance efinance online transfer bank countries';
19
20
    /**
21
     * @return string
22
     */
23
    public function getName()
24
    {
25
        return PaymentTransfer::PAYONE_POSTFINANCE_EFINANCE_ONLINE_TRANSFER;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getPropertyPath()
32
    {
33
        return PaymentTransfer::PAYONE_POSTFINANCE_EFINANCE_ONLINE_TRANSFER;
34
    }
35
36
    /**
37
     * @param \Symfony\Component\Form\FormBuilderInterface $builder
38
     * @param array $options
39
     *
40
     * @return $this
41
     */
42
    public function addOnlineBankTransferType(FormBuilderInterface $builder, array $options)
43
    {
44
        $builder->add(
45
            static::FIELD_ONLINE_BANK_TRANSFER_TYPE,
46
            HiddenType::class,
47
            [
48
                'label' => false,
49
                'data' => PayoneApiConstants::ONLINE_BANK_TRANSFER_TYPE_POSTFINANCE_EFINANCE,
50
            ]
51
        );
52
53
        return $this;
54
    }
55
}
56