An open API service indexing awesome lists of open source software.

https://github.com/scaleupstack/assert

A tiny wrapper around webmozart/assert that is easily extendable to throw project-specific assertions.
https://github.com/scaleupstack/assert

assert assertions check php php7 validation

Last synced: 10 months ago
JSON representation

A tiny wrapper around webmozart/assert that is easily extendable to throw project-specific assertions.

Awesome Lists containing this project

README

          

# ScaleUpStack/Assert

This library is a tiny wrapper around [webmozart/assert], a library that provides "Assertions to validate method input/output with nice error messages". ScaleUpStack/Assert allows you to extend that library easily to throw a project-specific exception in case an assertion is invalid.

The main reason of this library is, that you can extend it in your project without the need to write a unit test to get full code coverage.

The concept how to extend the base class was inspired by [beberlei/assert].

## Installation

Use [Composer] to install this library:

```
$ composer require scaleupstack/assert
```

## Usage

```php

Thomas Nunninger

[www.scaleupventures.com]

[webmozart/assert]: https://github.com/webmozart/assert
[beberlei/assert]: https://github.com/beberlei/assert
[Composer]: https://getcomposer.org
[issue tracker]: https://github.com/scaleupstack/assert/issues
[Git repository]: https://github.com/scaleupstack/assert
[LICENSE.md]: LICENSE.md
[www.scaleupventures.com]: https://www.scaleupventures.com/