Open vm06007 opened 1 year ago
This is used only when input arguments contain values that are not explicitly giving the meaning behind them. For example: true or false, or integer values without context. In this case team is more comfortable to have key-value style for such function calls to give context meaning to some values when necessary. Team considers this less readable, and only uses when necessary.
It is absolutely fine to use both approaches depending on the need. If function call does not have arguments without context team does ont use in majority of cases key->value pattern when calling function with parameters.
In particular case we can see the call uses 0
value and if done without property name it is hard to understand what is this argument represents. Key-Value gives context so in this case team feels more comfortable to use such pattern.
WSY-06C: Non-Uniform Invocation Style
Description:
The referenced statement invokes the
WiseSecurityHelper::checkBorrowLimit
function using the key-value declaration style which is not applied anywhere else in the codebase.Example:
Recommendation:
We advise a uniform invocation style to be applied to the code, either using the key-value invocation style across all contracts in the repository or by omitting the key-value invocation style in the referenced statement. We consider either of the two solutions as adequate in remediating this exhibit.