MaxGoryunov/saving-iterator

View on GitHub
src/Count.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace MaxGoryunov\SavingIterator\Src;

/**
 * Counts how many times something happened.
 */
interface Count
{

    /**
     * Returns a counter with an incremented value.
     *
     * @return self
     */
    public function increment(): self;

    /**
     * Returns the number of times something happened.
     *
     * @return int
     */
    public function value(): int;
}