PayoneSubFormsPlugin::getPaymentMethodsSubForms()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 0
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\Plugin;
9
10
use Spryker\Yves\Kernel\AbstractPlugin;
11
12
/**
13
 * @method \SprykerEco\Yves\Payone\PayoneFactory getFactory()
14
 */
15
class PayoneSubFormsPlugin extends AbstractPlugin
16
{
17
    /**
18
     * @var \SprykerEco\Yves\Payone\Plugin\PluginCountryFactory
19
     */
20
    protected $pluginCountryFactory;
21
22
    public function __construct()
23
    {
24
        $this->pluginCountryFactory = new PluginCountryFactory();
25
    }
26
27
    /**
28
     * @return \Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginInterface[]
29
     */
30
    public function getPaymentMethodsSubForms()
31
    {
32
        $subFormsCreator = $this->pluginCountryFactory->createSubFormsCreator(
33
            $this->getFactory()->createStoreReader()->getDefaultStoreCountry(),
34
        );
35
36
        $paymentMethodsSubForms = $subFormsCreator->createPaymentMethodsSubForms();
37
38
        return $paymentMethodsSubForms;
39
    }
40
}
41