Reports map
and getOrElse
on Option
and suggests to replace
them with fold
.
Example:
def p(x: Int): Boolean = ???
Option(0).map(p).getOrElse(false)
After the quick-fix is applied:
def p(x: Int): Boolean = ???
Option(0).fold(false)(p)