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\Ratepay\Form; |
||
9 | |||
10 | use Generated\Shared\Transfer\RatepayPaymentPrepaymentTransfer; |
||
11 | use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface; |
||
12 | use SprykerEco\Shared\Ratepay\RatepayConfig; |
||
13 | use Symfony\Component\Form\FormBuilderInterface; |
||
14 | use Symfony\Component\OptionsResolver\OptionsResolver; |
||
15 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
||
16 | |||
17 | class PrepaymentSubForm extends SubFormAbstract |
||
18 | { |
||
19 | public const PAYMENT_METHOD = 'prepayment'; |
||
20 | |||
21 | /** |
||
22 | * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver |
||
23 | * |
||
24 | * @return void |
||
25 | */ |
||
26 | public function configureOptions(OptionsResolver $resolver) |
||
27 | { |
||
28 | $resolver->setDefaults([ |
||
29 | 'data_class' => RatepayPaymentPrepaymentTransfer::class, |
||
30 | SubFormInterface::OPTIONS_FIELD_NAME => [], |
||
31 | ]); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @deprecated Use `configureOptions()` instead. |
||
36 | * |
||
37 | * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver |
||
38 | * |
||
39 | * @return void |
||
40 | */ |
||
41 | public function setDefaultOptions(OptionsResolverInterface $resolver) |
||
42 | { |
||
43 | $this->configureOptions($resolver); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getPropertyPath() |
||
50 | { |
||
51 | return RatepayConfig::PAYMENT_METHOD_PREPAYMENT; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getName() |
||
58 | { |
||
59 | return RatepayConfig::PAYMENT_METHOD_PREPAYMENT; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | public function getTemplatePath() |
||
66 | { |
||
67 | return RatepayConfig::PROVIDER_NAME . '/' . static::PAYMENT_METHOD; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @param \Symfony\Component\Form\FormBuilderInterface $builder |
||
72 | * @param array $options |
||
73 | * |
||
74 | * @return void |
||
75 | */ |
||
76 | public function buildForm(FormBuilderInterface $builder, array $options) |
||
77 | { |
||
78 | parent::buildForm($builder, $options); |
||
79 | } |
||
80 | |||
81 | /** |
||
82 | * @param \Symfony\Component\Form\FormBuilderInterface $builder |
||
83 | * |
||
84 | * @return $this |
||
85 | */ |
||
86 | protected function addAcceptInquiry(FormBuilderInterface $builder) |
||
87 | { |
||
88 | $builder->add( |
||
89 | self::FIELD_ALLOW_CREDIT_INQUIRY, |
||
90 | CheckboxType::class, |
||
0 ignored issues
–
show
|
|||
91 | [ |
||
92 | 'label' => false, |
||
93 | 'required' => true, |
||
94 | 'constraints' => [ |
||
95 | $this->createNotBlankConstraint(), |
||
96 | ], |
||
97 | ] |
||
98 | ); |
||
99 | |||
100 | return $this; |
||
101 | } |
||
102 | } |
||
103 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths