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-12-06 01:59:43 UTC


README

DRY helper for describing variables

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