Last modified: 2013-08-01 09:57:02 UTC
This commit, which has already been merged, adds a bunch of code duplication: https://gerrit.wikimedia.org/r/#/c/69630/3 The duplication in question is the splitString method in the dd, dm and dms parsers. As far as I can see, the only difference is in the delimiters list, which could easily be made a parameter. These 3 classes are similar and are thus prone to having code that does not differ much. In certain cases this is hard to avoid, or simply not worth it. However in this case it is going a bit far. It'd be better to put this code into its own class and have it take the delimiters as parameter. Even if the 3 coordinate parsers then create a new instance of this thing themselves (tight coupling bla bla bla, but this is already the case).
Related URL: https://gerrit.wikimedia.org/r/70593 (Gerrit Change Ic3c72b6d58251e8067e5b93ec369a5f857ae0997)
Verified in Wikidata demo July 31th.