~ancarda/high-test-coverage

d1bc435808be09bc3692d8f6bd70743d346562a1 — Mark Dain 2 months ago 171da76
Make DocBlocks more generic and reusable
3 files changed, 7 insertions(+), 6 deletions(-)

M src/RandomInt/Fixed.php
M src/RandomInt/RandomInt.php
M src/RandomInt/Succession.php
M src/RandomInt/Fixed.php => src/RandomInt/Fixed.php +2 -2
@@ 7,8 7,8 @@ namespace Ancarda\HighTestCoverage\RandomInt;
/**
 * Return a predetermined fixed value every time
 *
 * This is the simplest possible implementation of RandomInt. The value given
 * in the constructor is returned from random_int every time.
 * This is the simplest possible implementation of RandomInt.
 * The value given in the constructor is returned from invoke every time.
 */
final class Fixed implements RandomInt
{

M src/RandomInt/RandomInt.php => src/RandomInt/RandomInt.php +2 -2
@@ 8,12 8,12 @@ namespace Ancarda\HighTestCoverage\RandomInt;
 * Mockable wrapper around random_int
 *
 * You should typehint with this interface in all your code. A typical use
 * would be to have a constructor accept a RandomInt like so:
 * would be to have a constructor accept an instance like so:
 *
 *     function __construct(RandomInt $randomInt)
 *
 * Which is then used throughout a class. Your Dependency Injection container
 * would then have an entry for RandomInt that resolves to Real:
 * would then have an entry that resolves to Real:
 *
 *     RandomInt::class => Real::class,
 *

M src/RandomInt/Succession.php => src/RandomInt/Succession.php +3 -2
@@ 11,8 11,9 @@ use LogicException;
 *
 * This implementation takes a list of integers in the constructor. Each time
 * a random integer is requested, the next number in the list is returned and
 * the pointer is moved one place. When the list is exhausted, the pointer
 * wraps around.
 * the pointer is moved one place.
 *
 * When the list is exhausted, the pointer wraps around.
 */
final class Succession implements RandomInt
{