Refactor debug logging into logDebug() method
Remove unnecessary elseif
Refactor vote for object with no identity
Object null check only needed once
getMasks is no longer called
testVote is now redundant, same as testVoteWhenNoObjectIsPassed
Values don't change, looping is redundant
$permissionMap is no longer needed in test
Add test for null PermissionMap