loading...

re: Don't return associative arrays! VIEW POST

FULL DISCUSSION
 

You can use anonymous class it'll get rid of creating interface and creating class

 

But wouldn't that make client code as tightly coupled to implementation of sendFiles() as using an array?

 

Sometimes minimum abstraction is enough but if you want to expand your logic of course it's better use an interfaced approach.

code of conduct - report abuse