Passed
Push — feature/paypal-express ( be9f92...d19b14 )
by Volodymyr
05:26
created

defineControllers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SprykerEco\Yves\Braintree\Plugin\Provider;
4
5
use Silex\Application;
6
use SprykerShop\Yves\ShopApplication\Plugin\Provider\AbstractYvesControllerProvider;
0 ignored issues
show
Bug introduced by
The type SprykerShop\Yves\ShopApp...tYvesControllerProvider 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...
7
8
class PaypalExpressControllerProvider extends AbstractYvesControllerProvider
9
{
10
    public const ROUTE_PAYPAL_EXPRESS_SUCCESS_RESPONSE = 'paypal-express-success';
11
12
    /**
13
     * @param \Silex\Application $app
14
     *
15
     * @return void
16
     */
17
    protected function defineControllers(Application $app)
18
    {
19
        $this->addPaypalExpressSuccessResponseRoute();
20
    }
21
22
    /**
23
     * @uses \SprykerEco\Yves\Braintree\Controller\PaypalExpressController::successAction()
24
     *
25
     * @return $this
26
     */
27
    protected function addPaypalExpressSuccessResponseRoute()
28
    {
29
        $this->createController(
30
            '/paypal-express/payment/success',
31
            static::ROUTE_PAYPAL_EXPRESS_SUCCESS_RESPONSE,
32
            'Braintree',
33
            'PaypalExpress',
34
            '/paypal-express/payment/success'
35
        );
36
37
        return $this;
38
    }
39
}