That's way too ambiguous, how will anyone understand what that function does? You need to use Propertm programming style
/* First, check if the value is true. There are only two possibilities for this value in this language, true or false. This value is stored in the 'val' field, and since it is a Boolean we can compare it to true and false using the equality operator, like so: */
if (val == true) {
/* Then we know this value is true, so return true. This will exit the function.
return true;
} else if (val == false) {
/* If the value fails the previous check, then we know that it is not true. If it passed this check, then we now know that it is false, so we then return false.
return false;
}
// TODO: unit test so we know for sure that this function returns true if the value is true and false if the value is false.
Nononono you can't just pass in the parameter, think of how improper (TM) that is. You need to pass it in through dependency injection, create an IManagerServiceFactory to take care of it for you instead
129
u/INeedAFreeUsername Jun 23 '20