PHP Exceptions
Introduction
How many times you throw exceptions in your code? and how many of them are repeating?, (*1)
This library collects general use cases and provide nice ::assert API., (*2)
Use it, don't waste your development time for custom exceptions, use one of our exceptions classes., (*3)
Usage
Tired of writing is_array($value) || $value instanceof \Traversable
?
Use predefined assertions and save your time, like so:, (*4)
``` php
use Exception\InvalidTypeException;, (*5)
function thatCanCantBeViolated($arrayOrTraversable) {
InvalidTypeException::assertIsTraversable($arrayOrTraversable);
// do your regular work
}, (*6)
## Installation
composer require widmogrod/php-exceptions, (*7)
## Development
This repository follows [semantic versioning concept](http://semver.org/).
If you want to contribute, just follow [GitHub workflow](https://guides.github.com/introduction/flow/) and open a pull request.
## Testing
Quality assurance is brought to you by [PHPSpec](http://www.phpspec.net/)
composer test
```, (*8)