for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace OzanAkman\RepositoryGenerator;
use Illuminate\Support\ServiceProvider;
class RepositoryGeneratorServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
$this->publishConfig();
}
* Register the service provider.
public function register()
$this->mergeConfig();
$this->registerCommands();
* Publish configuration.
protected function publishConfig()
$configPath = __DIR__.'/../config/repository-generator.php';
if (function_exists('config_path')) {
$publishPath = config_path('repository-generator.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
$publishPath = /** @scrutinizer ignore-call */ config_path('repository-generator.php');
} else {
$publishPath = base_path('config/repository-generator.php');
base_path
$publishPath = /** @scrutinizer ignore-call */ base_path('config/repository-generator.php');
// Publish config files
$this->publishes([$configPath => $publishPath], 'config');
* Merges configs.
protected function mergeConfig()
$this->mergeConfigFrom(__DIR__.'/../config/repository-generator.php', 'repository-generator');
* Register package commands.
protected function registerCommands()
if ($this->app->runningInConsole()) {
$this->commands([
Console\Commands\Generate::class,
]);