Issues (48)

src/SolarEdgeServiceProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace PragmaBroadvertising\SolarEdge;
4
5
use Illuminate\Support\ServiceProvider;
6
use PragmaBroadvertising\SolarEdge\Models\SolarEdge;
7
use PragmaBroadvertising\SolarEdge\Models\SolarEdgeClient;
8
9
class SolarEdgeServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        $this->publishes([
19
            __DIR__ . '/config/main.php' => config_path('laravel-solaredge-api.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

19
            __DIR__ . '/config/main.php' => /** @scrutinizer ignore-call */ config_path('laravel-solaredge-api.php')
Loading history...
20
        ], 'laravel-solaredge-api');
21
    }
22
23
    /**
24
     * Register the application services.
25
     */
26
    public function register()
27
    {
28
        $this->mergeConfigFrom(
29
            __DIR__ . '/config/main.php', 'laravel-solaredge-api'
30
        );
31
32
        $this->app->register('Ixudra\Curl\CurlServiceProvider');
33
34
        $this->app->bind('solaredge', function() {
35
                return new SolarEdge(new SolarEdgeClient());
36
        });
37
    }
38
}
39