Remove FreshRSS_Searchable for better types#5212
Conversation
The interface was not used, and it was preventing more precise types for the different `searchById()` methods, as they each have different input and output types.
|
Suggestion : The interface allows making sure that the method ::searchById($id) is well implemented, it has a real utility. |
|
I would like to point you to the YAGNI (You aren't gonna need it) principle
It is not used at all at the moment, so it does not make sure of anything, and therefore has no utility. Plus, it is not even the same types for all implementations, so it is not a good case for an interface.
It is having this interface that makes the code more verbose right now. Here is a bit of background https://betterprogramming.pub/avoiding-premature-software-abstractions-8ba2e990930a |
|
Let's move on. It is easy to add again, should it ever become relevant, and in the meantime, it stands in the way |
You’r right |
The interface was not used, and it was preventing more precise types for the different
searchById()methods, as they each have different input and output types.