private function triggersFor($user = null, array $filter = []) {
        if (empty($user) || empty($filter)) {
            return true;
        }

        $filter = array_merge(['whitelist' => [], 'blacklist' => []],  $filter);

        $whitelist = array_flip($filter['whitelist']);
        $blacklist = array_flip($filter['blacklist']);

        if (
            // Both lists are empty
            empty($whitelist) && empty($blacklist) ||

            // Whitelist is empty, and the user is not blacklisted
            empty($whitelist) && !isset($blacklist[$user]) ||

            // Blacklist is empty, and the user is whitelisted
            empty($blacklist) && isset($whitelist[$user])
        ) {
            return true;
        }

        return false;
    }