for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LeKoala\DebugBar\Extension;
use LeKoala\DebugBar\DebugBar;
use SilverStripe\Core\Extension;
use SilverStripe\Control\Email\Email;
use Symfony\Component\Mailer\Event\MessageEvent;
/**
* Extends \SilverStripe\Control\Email\MailerSubscriber
*/
class DebugMailerExtension extends Extension
{
* Store queries
*
* @var array
protected static $queries = [];
* @param Email $email
* @param MessageEvent $event
function updateOnMessage($email, $event)
$event
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
function updateOnMessage($email, /** @scrutinizer ignore-unused */ $event)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
DebugBar::withDebugBar(function (\DebugBar\DebugBar $debugbar) use ($email) {
/** @var \LeKoala\DebugBar\Bridge\SymfonyMailer\SymfonyMailerCollector $mailerCollector */
$mailerCollector = $debugbar->getCollector('symfonymailer_mails');
$mailerCollector->add($email);
});
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.