Issues (2)

src/DotpayServiceProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Evilnet\Dotpay;
4
5
use Evilnet\Dotpay\DotpayApi\DotpayApi;
6
use Illuminate\Support\ServiceProvider;
7
8
class DotpayServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Perform post-registration booting of services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->publishes([
18
            __DIR__.'/config/dotpay.php' => config_path('dotpay.php'),
0 ignored issues
show
The function config_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

18
            __DIR__.'/config/dotpay.php' => /** @scrutinizer ignore-call */ config_path('dotpay.php'),
Loading history...
19
        ]);
20
    }
21
22
    /**
23
     * Register any package services.
24
     *
25
     * @return void
26
     */
27
    public function register()
28
    {
29
        $this->app->singleton(DotpayApi::class, function ($app) {
30
            return new DotpayApi($app['config']['dotpay']['api']);
31
        });
32
33
        $this->app->bind('dotpay', function($app) {
34
            return new DotpayManager($app[DotpayApi::class]);
35
        });
36
    }
37
}