phf/varinfo

变量的描述,例如用于异常消息

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

This package is auto-updated.

Last update: 2024-09-06 01:29:46 UTC


README

描述变量的DRY辅助工具

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