Issues (9)

src/ServiceProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Fomvasss\LaravelStrTokens;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7
    protected $defer = false;
8
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([__DIR__.'/../config/str-tokens.php' => config_path('str-tokens.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

16
        $this->publishes([__DIR__.'/../config/str-tokens.php' => /** @scrutinizer ignore-call */ config_path('str-tokens.php')
Loading history...
17
        ], 'str-tokens-config');
18
    }
19
20
    /**
21
     * Register the application services.
22
     *
23
     * @return void
24
     */
25
    public function register()
26
    {
27
        $this->mergeConfigFrom(__DIR__.'/../config/str-tokens.php', 'str-tokens');
28
29
        $this->app->singleton(StrTokenGenerator::class, function () {
30
            return new StrTokenGenerator($this->app);
31
        });
32
    }
33
}
34