Feb 27, 2022
Both ways are hard to read for me. They are also hard to maintain. What I like to do is create an associative array to create a dictionary. It makes code perfectly nice to read and maintain. It is also a good starting point for later refactoring for example to extract a nice function, service or class to provide the decision answer.