lib/teamsupport/ticket.rb
This conditional expression can just be replaced by @attrs[:IsKnowledgeBase] == 'True'
. Open
Open
@attrs[:IsKnowledgeBase] == 'True' ? true : false
- Read upRead up
- Exclude checks
This cop checks for redundant returning of true/false in conditionals.
Example:
# bad
x == y ? true : false
# bad
if x == y
true
else
false
end
# good
x == y
# bad
x == y ? false : true
# good
x != y
This conditional expression can just be replaced by @attrs[:IsVisibleOnPortal] == 'True'
. Open
Open
@attrs[:IsVisibleOnPortal] == 'True' ? true : false
- Read upRead up
- Exclude checks
This cop checks for redundant returning of true/false in conditionals.
Example:
# bad
x == y ? true : false
# bad
if x == y
true
else
false
end
# good
x == y
# bad
x == y ? false : true
# good
x != y
This conditional expression can just be replaced by @attrs[:IsClosed] == 'True'
. Open
Open
@attrs[:IsClosed] == 'True' ? true : false
- Read upRead up
- Exclude checks
This cop checks for redundant returning of true/false in conditionals.
Example:
# bad
x == y ? true : false
# bad
if x == y
true
else
false
end
# good
x == y
# bad
x == y ? false : true
# good
x != y