Passed
Pull Request — master (#4)
by Aleksey
11:47 queued 02:44
created

CrefoPayPayPalSubFormPlugin   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2

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
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Yves\CrefoPay\Plugin\StepEngine\SubForm;
9
10
use Spryker\Yves\Kernel\AbstractPlugin;
11
use Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface;
12
use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface;
13
use Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginInterface;
14
15
/**
16
 * @method \SprykerEco\Yves\CrefoPay\CrefoPayFactory getFactory()
17
 *
18
 * @SuppressWarnings(PHPMD.NewPluginExtensionModuleRule)
19
 */
20
class CrefoPayPayPalSubFormPlugin extends AbstractPlugin implements SubFormPluginInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     *
25
     * @api
26
     *
27
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
28
     */
29
    public function createSubForm(): SubFormInterface
30
    {
31
        return $this->getFactory()->createPayPalForm();
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     *
37
     * @api
38
     *
39
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
40
     */
41
    public function createSubFormDataProvider(): StepEngineFormDataProviderInterface
42
    {
43
        return $this->getFactory()->createPayPalFormDataProvider();
44
    }
45
}
46