Check your privileges
-
I found a small library of WTFs collected through the years. Let's start with a mild example of good naming:
public function hasBothPrivileges($privileges = []) { foreach($privileges as $privilege) { if(!$this->hasPrivilege($privilege)){ return false; } } return true; }
-
My money would be it starting with two parameters, then needing to be expanded to support an arbitrary number of privileges.