CrefoPayControllerProvider::defineControllers()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 32
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 24
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 32
rs 9.536
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\Provider;
9
10
use Silex\Application;
11
use SprykerShop\Yves\ShopApplication\Plugin\Provider\AbstractYvesControllerProvider;
12
13
/**
14
 * @deprecated Use {@link \SprykerEco\Yves\CrefoPay\Plugin\Router\CrefoPayRouteProviderPlugin} instead.
15
 */
16
class CrefoPayControllerProvider extends AbstractYvesControllerProvider
0 ignored issues
show
Deprecated Code introduced by
The class SprykerShop\Yves\ShopApp...tYvesControllerProvider has been deprecated: Use {@link \Spryker\Yves\Router\Plugin\RouteProvider\AbstractRouteProviderPlugin} instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

16
class CrefoPayControllerProvider extends /** @scrutinizer ignore-deprecated */ AbstractYvesControllerProvider
Loading history...
17
{
18
    /**
19
     * @var string
20
     */
21
    protected const BUNDLE_NAME = 'CrefoPay';
22
23
    /**
24
     * @var string
25
     */
26
    protected const CALLBACK_CONTROLLER_NAME = 'Callback';
27
28
    /**
29
     * @var string
30
     */
31
    protected const NOTIFICATION_CONTROLLER_NAME = 'Notification';
32
33
    /**
34
     * @var string
35
     */
36
    protected const CREFO_PAY_NOTIFICATION = 'crefo-pay-notification';
37
38
    /**
39
     * @var string
40
     */
41
    protected const CREFO_PAY_CONFIRMATION = 'crefo-pay-confirmation';
42
43
    /**
44
     * @var string
45
     */
46
    protected const CREFO_PAY_SUCCESS = 'crefo-pay-success';
47
48
    /**
49
     * @var string
50
     */
51
    protected const CREFO_PAY_FAILURE = 'crefo-pay-failure';
52
53
    /**
54
     * @param \Silex\Application $app
55
     *
56
     * @return void
57
     */
58
    protected function defineControllers(Application $app): void
59
    {
60
        $this->createController(
61
            '/crefo-pay/notification',
62
            static::CREFO_PAY_NOTIFICATION,
63
            static::BUNDLE_NAME,
64
            static::NOTIFICATION_CONTROLLER_NAME,
65
            'index',
66
        );
67
68
        $this->createController(
69
            '/crefo-pay/callback/confirmation',
70
            static::CREFO_PAY_CONFIRMATION,
71
            static::BUNDLE_NAME,
72
            static::CALLBACK_CONTROLLER_NAME,
73
            'confirmation',
74
        );
75
76
        $this->createController(
77
            '/crefo-pay/callback/success',
78
            static::CREFO_PAY_SUCCESS,
79
            static::BUNDLE_NAME,
80
            static::CALLBACK_CONTROLLER_NAME,
81
            'success',
82
        );
83
84
        $this->createController(
85
            '/crefo-pay/callback/failure',
86
            static::CREFO_PAY_FAILURE,
87
            static::BUNDLE_NAME,
88
            static::CALLBACK_CONTROLLER_NAME,
89
            'failure',
90
        );
91
    }
92
}
93