PHPackages                             atournayre/assert - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. atournayre/assert

Abandoned → [atournayre/framework](/?search=atournayre%2Fframework)Library[Validation &amp; Sanitization](/categories/validation)

atournayre/assert
=================

Assertions to validate method input/output with nice error messages.

0.2.1(3y ago)02.4k[1 issues](https://github.com/atournayre/assert/issues)2MITPHPPHP &gt;=8.0

Since Mar 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/atournayre/assert)[ Packagist](https://packagist.org/packages/atournayre/assert)[ RSS](/packages/atournayre-assert/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (2)

Atournayre Assert
=================

[](#atournayre-assert)

This library extends [webmozart/assert](https://github.com/webmozart/assert) with additional assertions.

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

[](#installation)

Use [Composer](https://getcomposer.org) to install the package:

```
composer require atournayre/assert
```

Assertions
----------

[](#assertions)

The \[`Assert`\] class provides the following assertions:

### Type Assertions

[](#type-assertions)

MethodDescription`isListOf(array $array, string $classOrType, string $message = '')`Check that the array is a list of a given type`isMapOf(array $array, string $classOrType, string $message = '')`Check that the array is a map of a given type`isType(mixed $value, string $type, string $message = '')`Check that a value is of a given type`allIsType(mixed $value, string $type, string $message = '')`Check that all values are of a given typeContribute
----------

[](#contribute)

Contributions to the package are always welcome!

- Report any bugs or issues you find on the [issue tracker](https://github.com/atournayre/assert/issues).
- You can grab the source code at the package's [Git repository](https://github.com/atournayre/assert).

License
-------

[](#license)

All contents of this package are licensed under the [MIT license](LICENSE).

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Total

4

Last Release

1099d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/be702ea3d10de6d97d83c32866fc9cfe1830a055e7f8b685c8434ccad40416c1?d=identicon)[atournayre](/maintainers/atournayre)

---

Top Contributors

[![atournayre](https://avatars.githubusercontent.com/u/4262077?v=4)](https://github.com/atournayre "atournayre (9 commits)")[![AChiffe](https://avatars.githubusercontent.com/u/94042011?v=4)](https://github.com/AChiffe "AChiffe (1 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")

---

Tags

checkassertvalidate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/atournayre-assert/health.svg)

```
[![Health](https://phpackages.com/badges/atournayre-assert/health.svg)](https://phpackages.com/packages/atournayre-assert)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M374](/packages/easycorp-easyadmin-bundle)[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k917.5M1.5k](/packages/webmozart-assert)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[kimai/kimai

Kimai - Time Tracking

4.7k8.7k1](/packages/kimai-kimai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M518](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
