I have following code:
return _.map(_.compact([
$scope.status() ? false : "status",
($scope.evidenceLevel || {}).id ? false : "evidence_level",
($scope.association || {}).id ? false : "association",
$scope.predictiveStatement ? false : "predictive_statement",
$scope.evidenceStatement ? false : "evidence_statement",
($scope.hasIncludedReference() || isReferred()) ? false : "reference"
]), myFunction);
Sonarqube thinks that this method too complicated (complexity is 11, max allowed is 10), is there any standard function for such code - ($scope.association || {}).id?