Timeline for Refactoring bad code switch statment without distort everything
Current License: CC BY-SA 4.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 21, 2018 at 12:46 | comment | added | shudder | If these ABC methods don't take parameters it should be easy to wrap the response from $repository into common interface (repository itself can implement some contract this way) - even with single method. Parameters change everything. Anyway, I wouldn't expect detailed answer here, because while concrete problem might have abstract solution (many implementations that lead to expected outcome), concrete solution to abstract problem does not exist. | |
| May 21, 2018 at 7:41 | history | edited | BruceStackOverFlow | CC BY-SA 4.0 |
added 2490 characters in body
|
| May 20, 2018 at 13:35 | history | edited | BruceStackOverFlow | CC BY-SA 4.0 |
added 20 characters in body
|
| May 20, 2018 at 13:31 | comment | added | BruceStackOverFlow | @bdsl technical problem, too long to explain... | |
| May 20, 2018 at 13:28 | comment | added | Martin Maat | You cannot change the classes, it calls for a virtual method though. | |
| May 20, 2018 at 13:26 | history | edited | BruceStackOverFlow | CC BY-SA 4.0 |
added 168 characters in body
|
| May 20, 2018 at 13:19 | comment | added | bdsl | Can you add an interface implementation to classAB, classCD and classEF or is there a reason you want to avoid editing them? | |
| May 20, 2018 at 13:18 | comment | added | bdsl | $class is a apparently a reference to an object, not the name of a class. I think it would be good to rename it to $object. | |
| May 20, 2018 at 13:16 | history | edited | BruceStackOverFlow | CC BY-SA 4.0 |
added 76 characters in body
|
| May 20, 2018 at 12:59 | review | First posts | |||
| May 20, 2018 at 23:17 | |||||
| May 20, 2018 at 12:57 | answer | added | bdsl | timeline score: 9 | |
| May 20, 2018 at 12:54 | history | asked | BruceStackOverFlow | CC BY-SA 4.0 |