The throwable with the energy of a 6 year old.
composer require dmelin/tantrumuse DMelin\Tantrum\Tantrum;
throw new Tantrum('cant open file.', 2);Output:
CANT. OPEN. FILE!
Tantrum accepts a rage level from 1 to 3. Values outside this range are clamped. Default rage is 1.
throw new Tantrum('cant open file.', 1);CANT OPEN FILE!
throw new Tantrum('cant open file.', 2);CANT. OPEN. FILE!
throw new Tantrum('cant open file.', 3);٩(ఠ益ఠ)۶ CANT! OPEN! FILE!!!
- Messages are converted to uppercase
- Periods become exclamation marks
- Rage 2 replaces spaces with
. - Rage 3 replaces spaces with
!and triples the final exclamation marks - Extends
RuntimeExceptionand can be caught as such - Supports exception chaining via the optional third parameter
composer install
vendor/bin/phpunitMIT