Passed
Push — master ( 22c2c5...ea0ef9 )
by Darío
01:12 queued 11s
created

PayPalServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
namespace Pleets\LaravelPayPal\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use PaymentGateway\PayPalSdk\PayPalService;
7
use Pleets\LaravelPayPal\Helpers\Environment;
8
9
class PayPalServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register services.
13
     *
14
     * @return void
15
     */
16
    public function register()
17
    {
18
        $this->app->bind(PayPalService::class, function () {
19
            $paypalService = new PayPalService(Environment::getEndpoint());
20
            $paypalService->setAuth(Environment::getClientId(), Environment::getSecret());
21
            return $paypalService;
22
        });
23
    }
24
}
25