dev-master
9999999-dev https://github.com/Roave/DontA small set of traits that can be used to prevent misuse of your objects
MIT
The Requires
- php ^7.1
The Development Requires
defensive programming strictness
Wallogit.com
2017 © Pedro Peláez
A small set of traits that can be used to prevent misuse of your objects
roave/dont is a small PHP package aimed at enforcing good
practices when it comes to designing
defensive code., (*1)
composer require roave/dont
The package currently provides the following traits:, (*3)
Dont\DontDeserialiseDont\DontSerialiseDont\DontCloneDont\DontGetDont\DontSetDont\DontCallDont\DontCallStaticDont\DontToStringDont\JustDontDont\DontInstantiateUsage is straightforward:, (*4)
use Dont\DontSerialise;
class MyClass
{
use DontSerialise;
}
serialize(new MyClass); // will throw an exception
A small set of traits that can be used to prevent misuse of your objects
MIT
defensive programming strictness