for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\Akismet\Tests;
use Exception;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Akismet\Service\AkismetService;
class AkismetTestService implements TestOnly, AkismetService
{
public function __construct($apiKey, $url)
$url
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function __construct($apiKey, /** @scrutinizer ignore-unused */ $url)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if ($apiKey !== 'dummykey') {
throw new Exception("Invalid key");
}
public function isSpam($content, $author = null, $email = null, $url = null, $permalink = null, $type = null)
// This dummy service only checks the content
return $content === 'spam';
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.