weblagence /
laravel-facebook-pixel
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace WebLAgence\LaravelFacebookPixel; |
||||
| 4 | |||||
| 5 | use Illuminate\Support\ServiceProvider; |
||||
|
0 ignored issues
–
show
|
|||||
| 6 | |||||
| 7 | /** |
||||
| 8 | * Class LaravelFacebookPixelServiceProvider |
||||
| 9 | * @package WebLAgence\LaravelFacebookPixel |
||||
| 10 | */ |
||||
| 11 | class LaravelFacebookPixelServiceProvider extends ServiceProvider |
||||
| 12 | { |
||||
| 13 | /** |
||||
| 14 | * Bootstrap the application events. |
||||
| 15 | */ |
||||
| 16 | public function boot() |
||||
| 17 | { |
||||
| 18 | $this->loadViewsFrom(__DIR__ . '/../resources/views', 'facebook-pixel'); |
||||
| 19 | |||||
| 20 | $this->publishes([ |
||||
| 21 | __DIR__.'/../resources/config/facebook-pixel.php' => config_path('facebook-pixel.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
Loading history...
|
|||||
| 22 | ], 'config'); |
||||
| 23 | |||||
| 24 | $this->app['view']->creator( |
||||
| 25 | ['facebook-pixel::head', 'facebook-pixel::body'], |
||||
| 26 | 'WebLAgence\LaravelFacebookPixel\ScriptViewCreator' |
||||
| 27 | ); |
||||
| 28 | } |
||||
| 29 | |||||
| 30 | /** |
||||
| 31 | * Register the service provider. |
||||
| 32 | */ |
||||
| 33 | public function register() |
||||
| 34 | { |
||||
| 35 | $this->mergeConfigFrom(__DIR__.'/../resources/config/facebook-pixel.php', 'facebook-pixel'); |
||||
| 36 | |||||
| 37 | $id = !empty(config('facebook-pixel.facebook_pixel_ids')) ? config('facebook-pixel.facebook_pixel_ids') : [config('facebook-pixel.facebook_pixel_id')]; |
||||
|
0 ignored issues
–
show
The function
config 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
Loading history...
|
|||||
| 38 | |||||
| 39 | $laravelFacebookPixel = new LaravelFacebookPixel($id); |
||||
| 40 | $laravelFacebookPixel->addCspNonce(config('facebook-pixel.csp_callback')); |
||||
| 41 | if (config('facebook-pixel.enabled') === false) { |
||||
| 42 | $laravelFacebookPixel->disable(); |
||||
| 43 | } |
||||
| 44 | |||||
| 45 | $this->app->instance('WebLAgence\LaravelFacebookPixel\LaravelFacebookPixel', $laravelFacebookPixel); |
||||
| 46 | $this->app->alias(LaravelFacebookPixel::class, 'facebook-pixel'); |
||||
| 47 | } |
||||
| 48 | } |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths