for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\Dev\Validation;
use ReflectionException;
use SilverStripe\Core\Extension;
use SilverStripe\ORM\DatabaseAdmin;
/**
* Hook up static validation to the deb/build process
*
* @method DatabaseAdmin getOwner()
*/
class DatabaseAdminExtension extends Extension
{
* Extension point in @see DatabaseAdmin::doBuild()
* @param bool $quiet
* @param bool $populate
* @param bool $testMode
* @throws ReflectionException
public function onAfterBuild(bool $quiet, bool $populate, bool $testMode): void
$quiet
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function onAfterBuild(/** @scrutinizer ignore-unused */ bool $quiet, bool $populate, bool $testMode): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$testMode
public function onAfterBuild(bool $quiet, bool $populate, /** @scrutinizer ignore-unused */ bool $testMode): void
$populate
public function onAfterBuild(bool $quiet, /** @scrutinizer ignore-unused */ bool $populate, bool $testMode): void
$service = RelationValidationService::singleton();
if (!$service->config()->get('output_enabled')) {
return;
}
$service->executeValidation();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.