The referenced statements will interact with the Delegator known implementation via low-level call operations rather than casting the delegator to an interface and invoking the methods that way.
We advise the code to declare a proper interface for the migration methods and for the DelegateFactory to properly use it, optimizing its legibility greatly.
If graceful error handling is desired, the try-catch paradigm can be adopted to achieve the same in a highly legible manner.
DFY-01C: Improper Low-Level Interactions
Description:
The referenced statements will interact with the
Delegator
known implementation via low-levelcall
operations rather than casting thedelegator
to aninterface
and invoking the methods that way.Example:
Recommendation:
We advise the code to declare a proper
interface
for the migration methods and for theDelegateFactory
to properly use it, optimizing its legibility greatly.If graceful error handling is desired, the try-catch paradigm can be adopted to achieve the same in a highly legible manner.