for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Jorijn\LaravelSecurityChecker;
class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;
* Register the service provider.
* @return void
public function register()
$configPath = __DIR__ . '/../config/laravel-security-checker.php';
$this->mergeConfigFrom($configPath, 'laravel-security-checker');
}
* Bootstrap the application events.
public function boot()
$this->publishes([$configPath => $this->getConfigPath()], 'config');
* Get the config path
* @return string
protected function getConfigPath()
return config_path('laravel-security-checker.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
return /** @scrutinizer ignore-call */ config_path('laravel-security-checker.php');
* Publish the config file
* @param string $configPath
protected function publishConfig($configPath)
$this->publishes([$configPath => config_path('laravel-security-checker.php')], 'config');
$this->publishes([$configPath => /** @scrutinizer ignore-call */ config_path('laravel-security-checker.php')], 'config');
This check marks files that end in a newline character, i.e. an empy line.