for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Support\XDebug;
use App\Events\StartedPorter;
use App\Events\StartedPorterService;
class EventSubscriber
{
/** @var XDebug */
protected $xdebug;
public function __construct(XDebug $xdebug)
$this->xdebug = $xdebug;
}
public function setXDebug($event)
$event
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function setXDebug(/** @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.
if (setting('use_xdebug') === 'off') {
setting('use_xdebug') === 'off'
false
$this->xdebug->turnOff();
$this->xdebug->turnOn();
/**
* Register the listeners for the subscriber.
*
* @param \Illuminate\Events\Dispatcher $events
* @return void
*/
public function subscribe($events)
$events->listen(StartedPorter::class, static::class.'@setXDebug');
$events->listen(StartedPorterService::class, static::class.'@setXDebug');
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.