for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Nxmad\Larapay;
use Nxmad\Larapay\Contracts\Payments;
use Illuminate\Support\ServiceProvider;
class LarapayServiceProvider extends ServiceProvider
{
/**
* Register Service Provider.
*
* @return void
*/
public function register()
$this->mergeConfigFrom($this->getConfigPath(), 'larapay');
$this->app->singleton(Payments::class, function ($app) {
return new GatewayManager($app['config']);
});
}
* Boot Service Provider.
public function boot()
$this->publishes([
$this->getDatabasePath() => database_path(),
database_path
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->getDatabasePath() => /** @scrutinizer ignore-call */ database_path(),
$this->getConfigPath() => config_path('larapay.php'),
config_path
$this->getConfigPath() => /** @scrutinizer ignore-call */ config_path('larapay.php'),
]);
$this->loadViewsFrom(__DIR__ . '/../files/views', 'larapay');
* Get default config path.
* @return string
protected function getConfigPath(): string
return __DIR__ . '/../files/config/larapay.php';
* Get default database path.
protected function getDatabasePath(): string
return __DIR__ . '/../files/database';