for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace EventSauce\EventSourcing\Integration\TestingAggregates;
use EventSauce\EventSourcing\AggregateRoot;
use EventSauce\EventSourcing\AggregateRootBehaviour;
class DummyAggregate implements AggregateRoot
{
use AggregateRootBehaviour;
private $incrementedNumber = 0;
private function __construct()
}
public function performDummyTask()
$this->recordThat(new DummyTaskWasExecuted());
public function increment()
$this->recordThat(new DummyIncrementingHappened(
$this->incrementedNumber + 1
));
protected function applyDummyIncrementingHappened(DummyIncrementingHappened $event)
$this->incrementedNumber = $event->number();
protected function applyDummyTaskWasExecuted(DummyTaskWasExecuted $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 applyDummyTaskWasExecuted(/** @scrutinizer ignore-unused */ DummyTaskWasExecuted $event)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
public function dontDoAnything()
// not doing anything.
public function throwAnException()
throw new DummyException();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.