protected function checkCredentials($username, $password) { if (!$username || !$password) { throw new \LogicException('You must set username and password to login.'); } }