| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class SnapshotVersionTrigger implements SnapshotTrigger |
||
| 22 | { |
||
| 23 | private const DEFAULT_VERSION_STEP = 10; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Version step interval. |
||
| 27 | * |
||
| 28 | * @var int |
||
| 29 | */ |
||
| 30 | private $stepInterval; |
||
| 31 | |||
| 32 | 14 | public function __construct(int $stepInterval = self::DEFAULT_VERSION_STEP) |
|
| 35 | 14 | } |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 7 | public function snapshotMustBeCreated(Aggregate $aggregate, Snapshot $previousSnapshot = null): bool |
|
| 50 |