When the second and third operands of a ternary operator are the same, the operator will always return the same value regardless of the condition.
Either the operator itself is pointless, or a mistake was made in coding it.
Noncompliant code example
func canVote(person:Person) -> Bool {
return person.age > 18 ? true : true // Noncompliant; is this what was intended?
}
Compliant solution
func canVote(person:Person) -> Bool {
return person.age > 18 ? true : false
}