PHPackages                             vancodx/php-data-assertion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. vancodx/php-data-assertion

ActiveLibrary[Testing &amp; Quality](/categories/testing)

vancodx/php-data-assertion
==========================

VanCodX PHP Data Assertion

1.0.2(5mo ago)00MITPHPPHP ^8.3

Since Aug 12Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/vancodx/php-data-assertion)[ Packagist](https://packagist.org/packages/vancodx/php-data-assertion)[ RSS](/packages/vancodx-php-data-assertion/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

VanCodX PHP Data Assertion
==========================

[](#vancodx-php-data-assertion)

This library contains a set of static methods for assertion the type of variables and arguments of functions and methods. The main goal is to improve the quality of data validation and static analysis. Each assertion method has "@phpstan-assert" tag in its DocBlock comment to narrow the type of "value" argument.

This library also includes [my PHP Data Validation library](https://github.com/vancodx/php-data-validation).

Installation
------------

[](#installation)

Install this package with the following command:

```
composer require vancodx/php-data-assertion

```

Usage
-----

[](#usage)

Example of assertion the type of a function argument:

```
