phf/varinfo

Description of variables e.g. for exception messages

v1.0.0 2021-05-05 17:51 UTC

This package is auto-updated.

Last update: 2024-11-06 01:48:10 UTC


README

DRY helper for describing variables

if (!\is_numeric($foo)) {
    throw new InvalidArgumentException(\sprintf(
        'Expected numeric - %s given',
        new PhF\Varinfo\Varinfo($foo)
    ));
}