for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
use App\Services\WhichPortal;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
// A lower default string length for migrations is required for
// versions of MySQL < 5.7.7
Schema::defaultStringLength(191);
//Force all routes and requests to use HTTPS
$this->app['request']->server->set('HTTPS', config('app.force_https'));
}
* Register any application services.
public function register()
// if ($this->app->environment() !== 'production') {
// //Generate migrations from database
// $this->app->register(\Way\Generators\GeneratorsServiceProvider::class);
// $this->app->register(\Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class);
//
// //Generate models from database
// $this->app->register(\Reliese\Coders\CodersServiceProvider::class);
// }
$this->app->singleton(WhichPortal::class, function ($app) {
$app
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
$this->app->singleton(WhichPortal::class, function (/** @scrutinizer ignore-unused */ $app) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return new WhichPortal();
});
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:
someFunctionCall( $firstArgument, $secondArgument, $thirdArgument ); // Closing parenthesis on a new line.