Registry / utility / yalesov-arg-validator

yalesov-arg-validator

JSON →
library2.1.1phppackagistunverified

Validate function arguments, extending typehinting capabilities of PHP.

composer require yalesov/arg-validator
INSTALL
IMPORT
SIG · YALESOV-ARG-VALIDA
Y
yalesov-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 Yalesov\ArgValidator\ArgValidator;

Validate function arguments with custom rules

use Yalesov\ArgValidator\ArgValidator; function greet(string $name, int $age) { ArgValidator::validate(func_get_args(), [ 'name' => 'string', 'age' => 'int' ]); echo "Hello $name, you are $age years old."; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.1.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

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