private function validateAccessList()
{
// Get all user lists
$declaredPublicKeys = array_map(function ($acl) {
return $acl['publicKey'];
}, $this->accessList);
$publicKeys = [];
foreach ($declaredPublicKeys as $key) {
if (in_array($key, $publicKeys)) {
throw new InvalidArgumentException('Public key declared twice in config: ' . $key, 500);
}
$publicKeys[] = $key;
}
}