gianarb / angry
This package is abandoned and no longer maintained.
No replacement package was suggested.
A collection of traits to defend classes from mis-use.
1.0.0
2021-01-25 09:09 UTC
Requires
- php: ^7.3 || ~8.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2022-05-15 11:50:49 UTC
README
This library is a collection of traits to stop mis-use of your classes. Based on @ocramius talk "Defensive Programming".
Installation
composer install gianarb/angry "^1.0"
Getting Started
- Block
cloneof a class useGianArb\Angry\Unclonabletrait. - Block invoking of a class e.g.
$className();useGianArb\Angry\Uninvokabletrait. - Block serialization of a class use
GianArb\Angry\Unserializabletrait. - Block all of the above use
GianArb\Angry\ClassDefencetrait.
Remember: the best way to write code is be lazy! http://blogoscoped.com/archive/2005-08-24-n14.html.