for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Srmklive\Chargify\Providers;
/*
* Class ChargifyServiceProvider
* @package Srmklive\Chargify
*/
use Illuminate\Support\ServiceProvider;
use Srmklive\Chargify\Services\ChargifyClient;
class ChargifyServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
protected $defer = false;
* Bootstrap the application events.
* @return void
public function boot()
// Publish config files
$this->publishes([
__DIR__.'/../../config/config.php' => config_path('chargify.php'),
config_path
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
__DIR__.'/../../config/config.php' => /** @scrutinizer ignore-call */ config_path('chargify.php'),
]);
}
* Register the service provider.
public function register()
$this->registerPayPal();
$this->mergeConfig();
* Register the application bindings.
private function registerPayPal()
$this->app->singleton('chargify', static function () {
return new ChargifyClient();
});
* Merges user's and paypal's configs.
private function mergeConfig()
$this->mergeConfigFrom(
__DIR__.'/../../config/config.php',
'chargify'
);