Passed
Pull Request — master (#67)
by
unknown
09:59
created

PayoneKlarnaSubFormPlugin   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
eloc 3
c 2
b 1
f 0
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createSubFormDataProvider() 0 3 1
A createSubForm() 0 3 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\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