Completed
Push — master ( 9db63e...40913a )
by Oleksandr
24s queued 13s
created

PayoneKlarnaSubFormPlugin::createSubForm()   A

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
eloc 1
c 1
b 0
f 0
dl 0
loc 3
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
use Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface;
12
use Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginInterface;
13
use SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm;
14
15
/**
16
 * @method \SprykerEco\Yves\Payone\PayoneFactory getFactory()
17
 */
18
class PayoneKlarnaSubFormPlugin extends AbstractPlugin implements SubFormPluginInterface
19
{
20
    /**
21
     * {@inheritDoc}
22
     * - Creates `KlarnaSubForm` subform.
23
     *
24
     * @api
25
     *
26
     * @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm
27
     */
28
    public function createSubForm(): AbstractPayoneSubForm
29
    {
30
        return $this->getFactory()->createKlarnaSubForm();
31
    }
32
33
    /**
34
     * {@inheritDoc}
35
     * - Creates `KlarnaSubFormDataProvider` data provider.
36
     *
37
     * @api
38
     *
39
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
40
     */
41
    public function createSubFormDataProvider(): StepEngineFormDataProviderInterface
42
    {
43
        return $this->getFactory()->createKlarnaDataProvider();
44
    }
45
}
46