Closed ravage84 closed 4 years ago
As for the why, there isn't a particular reason and definitely agree that class constants should be used instead. It might take a bit of time before all literals are transposed to class constants.
Cheers! Sacha
This issue has been open 30 days with no activity. Please remove the stale label or comment, or this will be closed in 5 days
This is a Request For Comment.
To be honest, I just came across your fine library,haven't had a chance to use it yet. But while I was browsing through the documentation and code, I was wondering why the names of the holidays are (magic) literals instead of class constants.
So ,for example, instead of doing this:
It could be this:
Magic literals can become a maintenance problem. Having class contants for them would centralize those magic literals, contain them & would make it possible to document them (with doc blocks, for example). Also having them would improve the developer experience as it would make them searchable through the IDEs.