Passed
Pull Request — dev (#4)
by Mykyta
11:52 queued 07:39
created

HeidelpayControllerProvider::defineControllers()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 40
Code Lines 30

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 40
c 0
b 0
f 0
rs 8.8571
cc 1
eloc 30
nc 1
nop 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\Heidelpay\Plugin\Provider;
9
10
use Silex\Application;
11
use Spryker\Yves\Application\Plugin\Provider\YvesControllerProvider;
1 ignored issue
show
Bug introduced by
The type Spryker\Yves\Application...\YvesControllerProvider was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
13
class HeidelpayControllerProvider extends YvesControllerProvider
14
{
15
    const HEIDELPAY_PAYMENT = 'heidelpay-payment';
16
    const HEIDELPAY_PAYMENT_FAILED = 'heidelpay-payment-failed';
17
    const HEIDELPAY_IDEAL_AUTHORIZE = 'heidelpay-ideal-authorize';
18
    const HEIDELPAY_CREDIT_CARD_REGISTER = 'heidelpay-cc-register';
19
    const HEIDELPAY_CREDIT_CARD_REGISTER_SUCCESS = 'heidelpay-cc-register-success';
20
21
    /**
22
     * @param \Silex\Application $app
23
     *
24
     * @return void
25
     */
26
    protected function defineControllers(Application $app)
27
    {
28
        $this->createController(
29
            '/heidelpay/payment-failed',
30
            static::HEIDELPAY_PAYMENT_FAILED,
31
            'Heidelpay',
32
            'Heidelpay',
33
            'paymentFailed'
34
        );
35
36
        $this->createController(
37
            '/heidelpay/payment',
38
            static::HEIDELPAY_PAYMENT,
39
            'Heidelpay',
40
            'Heidelpay',
41
            'payment'
42
        );
43
44
        $this->createController(
45
            '/heidelpay/ideal-authorize',
46
            static::HEIDELPAY_IDEAL_AUTHORIZE,
47
            'Heidelpay',
48
            'Ideal',
49
            'authorize'
50
        );
51
52
        $this->createController(
53
            '/heidelpay/cc-register-response',
54
            static::HEIDELPAY_CREDIT_CARD_REGISTER,
55
            'Heidelpay',
56
            'CreditCard',
57
            'registrationRequest'
58
        );
59
60
        $this->createController(
61
            '/heidelpay/cc-register-success',
62
            static::HEIDELPAY_CREDIT_CARD_REGISTER_SUCCESS,
63
            'Heidelpay',
64
            'CreditCard',
65
            'registrationSuccess'
66
        );
67
    }
68
}
69