ixnode / php-exception
PHP Exception - This library offers some ready to use PHP Exceptions.
Installs: 5 059
Dependents: 10
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ixnode/php-exception
Requires
- php: ^8.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.13
- ixnode/bash-version-manager: 0.1.9
- jetbrains/phpstorm-attributes: ^1.0
- phpmd/phpmd: ^2.13
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
- povils/phpmnd: ^3.0
- rector/rector: ^0.15.1
README
This library offers some ready to use PHP Exceptions.
Exception Classes
Group Array
ArrayGroup Case
CaseGroup Class
Class| Name | Parameter | Usage | 
|---|---|---|
| ClassInvalidException | string $classstring $expected | Used to indicate that a given or passed class is invalid. | 
Group Configuration
Configuration| Name | Parameter | Usage | 
|---|---|---|
| ConfigurationMissingException | string $hint | Used to indicate that a configuration or an action is missing. | 
Group Db
Db| Name | Parameter | Usage | 
|---|---|---|
| DbEntityNotFoundException | string $class | Used to indicate that a db entity was not found. | 
Group File
FileGroup Function
FunctionGroup Parser
Parser| Name | Parameter | Usage | 
|---|---|---|
| ParserException | string $parseStringstring $context | Used to indicate that a given string could not be parsed. | 
Group Type
Type| Name | Parameter | Usage | 
|---|---|---|
| TypeInvalidException | string $expected?string $given = null | Used to indicate that a given or passed variable is the wrong type. | 
Installation
composer require ixnode/php-exception
vendor/bin/php-exception -V
php-exception 0.1.0 (12-30-2022 11:41:25) - Björn Hempel <bjoern@hempel.li>
Usage
use Ixnode\PhpException\FileNotFoundException;
throw new FileNotFoundException('path-to-file');
Development
git clone git@github.com:ixnode/php-exception.git && cd php-exception
composer install
composer test
License
This tool is licensed under the MIT License - see the LICENSE file for details