for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace Backpack\CRUD\Tests;
use Backpack\CRUD\BackpackServiceProvider;
use Orchestra\Testbench\TestCase;
abstract class BaseTest extends TestCase
{
/**
* Setup the test environment.
*
* @return void
*/
protected function setUp(): void
parent::setUp();
}
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 [
BackpackServiceProvider::class,
];
// allow us to run crud panel private/protected methods like `inferFieldTypeFromDbColumnType`
public function invokeMethod(&$object, $methodName, array $parameters = [])
$reflection = new \ReflectionClass(get_class($object));
$method = $reflection->getMethod($methodName);
$method->setAccessible(true);
return $method->invokeArgs($object, $parameters);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.