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-04-06 00:40:00 UTC


README

DRY helper for describing variables

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