Registry / utility / heartsentwined-arg-validator

heartsentwined-arg-validator

JSON →
library2.1.1phppackagistunverified

Validate function arguments, extending PHP's type hinting capabilities.

composer require heartsentwined/arg-validator
INSTALL
IMPORT
SIG · HEARTSENTWINED-ARG
H
heartsentwined-arg-validator
utilityphpv2.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ArgValidator
use Heartsentwined\ArgValidator\ArgValidator;

Validate function arguments with custom rules.

use Heartsentwined\ArgValidator\ArgValidator; function greet(string $name): void { ArgValidator::validate(func_get_args(), [ 'name' => 'string:min=2' ]); echo "Hello $name"; }
Debug
Known issues
breakingMay conflict with PHP 8's named arguments.
fix
Use positional arguments or update to a compatible version.
affects: <3.0.0
Upgrade
Version history
2.1.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
heartsentwined-arg-validator — pip install heartsentwined-arg-validator · libregistry