for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Longman\TelegramBot\Bootstrap;
use Illuminate\Database\Migrations\DatabaseMigrationRepository;
use Illuminate\Database\Migrations\MigrationCreator;
use Illuminate\Database\Migrations\Migrator;
use Illuminate\Filesystem\Filesystem;
use Longman\TelegramBot\Application;
use function env;
class SetupMigrations
{
public function bootstrap(Application $app)
$app->singleton('files', function (Application $app) {
$app
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return new Filesystem();
});
$app->singleton('migration.repository', function (Application $app) {
$table = env('TG_DB_MIGRATIONS_TABLE', 'migrations');
return new DatabaseMigrationRepository($app['db.resolver'], $table);
$app->singleton('migrator', function (Application $app) {
$repository = $app['migration.repository'];
return new Migrator($repository, $app['db.resolver'], $app['files']);
$app->singleton('migration.creator', function (Application $app) {
return new MigrationCreator($app['files']);
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.