tron-api
tron-api copied to clipboard
Make functions from TronAwareTrait - static
I suggest you to convert functions like fromTron, toTron, fromHex, toHex etc to static as thay do not use Tron object internal state and should be called without instantiating whole tron object.
If you are afraid of braking api compatibility then you should do this in 4 steps.
- Make static copies of those functions
- Make non static functions to use static ones
- Declare non-static functions as deprecated
- After some time - remove non-static functions from trait
https://github.com/iexbase/tron-api/blob/master/src/Tron.php#L138