for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace EventSauce\EventSourcing\LibraryConsumptionTests\ComplexAggregates;
use EventSauce\EventSourcing\AggregateRoot;
use EventSauce\EventSourcing\AggregateRootWithAggregates;
class ComplexAggregateRoot implements AggregateRoot
{
use AggregateRootWithAggregates;
/**
* @var DelegatedBehaviorInAggregate
*/
private $delegatedAggregate;
protected function applyDelegatedAggregateWasChosen(DelegatedAggregateWasChosen $event)
$event
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function applyDelegatedAggregateWasChosen(/** @scrutinizer ignore-unused */ DelegatedAggregateWasChosen $event)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$this->delegatedAggregate = new DelegatedBehaviorInAggregate($this->eventRecorder());
$this->registerAggregate($this->delegatedAggregate);
}
protected function applyDelegatedAggregateWasDiscarded(DelegatedAggregateWasDiscarded $event)
protected function applyDelegatedAggregateWasDiscarded(/** @scrutinizer ignore-unused */ DelegatedAggregateWasDiscarded $event)
$this->unregisterAggregate($this->delegatedAggregate);
public function causeDelegatedAction(): void
assert($this->delegatedAggregate instanceof DelegatedBehaviorInAggregate);
$this->delegatedAggregate->performAction();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.