for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Turahe\Counters\Tests;
use Illuminate\Database\Schema\Blueprint;
use Mockery;
class TestCase extends \Orchestra\Testbench\TestCase
{
public function setUp(): void
parent::setUp();
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
$this->setUpDatabase();
}
/**
* {@inheritdoc}
*/
protected function getPackageProviders($app)
$app
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function getPackageProviders(/** @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 [\Turahe\Counters\CountersServiceProvider::class];
* @param \Illuminate\Foundation\Application $app
protected function getEnvironmentSetUp($app)
$app['config']->set('database.default', 'sqlite');
$app['config']->set('database.connections.sqlite', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
$app['config']->set('app.key', 'base64:MFOsOH9RomiI2LRdgP4hIeoQJ5nyBhdABdH77UY2zi8=');
protected function setUpDatabase()
$this->app['db']->connection()->getSchemaBuilder()->create('posts', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->timestamps();
});
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.