Closed khepin closed 2 years ago
This is definitely a weird trick but ... since the methods are in a trait and never in an interface. It's possible to override them with different type requirements.
So an enum can do fromJsonData(string $data) instead of fromJsonData(array $data)
fromJsonData(string $data)
fromJsonData(array $data)
Think removing the typehints makes more sense then
This is definitely a weird trick but ... since the methods are in a trait and never in an interface. It's possible to override them with different type requirements.
So an enum can do
fromJsonData(string $data)
instead offromJsonData(array $data)