for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JosephNC\Translation\Tests;
use JosephNC\Translation\TranslationServiceProvider;
use Orchestra\Testbench\TestCase;
class FunctionalTestCase extends TestCase
{
/**
* Set up the test environment.
*/
public function setUp()
parent::setUp();
$this->artisan('migrate', [
'--database' => 'testbench',
'--realpath' => realpath(__DIR__.'/../src/Migrations'),
]);
}
* Define environment setup.
*
* @param \Illuminate\Foundation\Application $app
* @return void
protected function getEnvironmentSetUp($app)
$app['config']->set('database.default', 'testbench');
$app['config']->set('database.connections.testbench', [
'driver' => 'sqlite',
'database' => ':memory:',
$app['config']->set('translation.locales', [
'en' => 'English',
'fr' => 'French',
$app['config']->set('translation.key', 123456);
* Returns the package providers.
* @return array
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 [TranslationServiceProvider::class];
* Returns the package aliases.
protected function getPackageAliases($app)
protected function getPackageAliases(/** @scrutinizer ignore-unused */ $app)
return ['Translation' => \JosephNC\Translation\Facades\Translation::class];
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.