Registry / utility / beberlei-assert

beberlei-assert

JSON →
library3.3.4phppackagistunverified

Thin assertion library for input validation in business models.

composer require beberlei/assert
INSTALL
IMPORT
SIG · BEBERLEI-ASSERT
B
beberlei-assert
utilityphpv3.3.4
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.

Assertion
use Assert\Assertion;

Validate input using Assertion static methods

use Assert\Assertion; Assertion::integer($value, 'Value must be an integer.'); Assertion::greaterThan($value, 0, 'Value must be positive.');
Debug
Known issues
gotchaAssertion throws InvalidArgumentException by default; catch it to handle failures gracefully.
fix
Wrap assertions in try-catch blocks or use a custom exception class.
affects: >=1.0.0
Upgrade
Version history
3.3.4latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Amazon
1
OpenAI (training)
1
Resources
beberlei-assert — pip install beberlei-assert · libregistry