public function checkVisibility($visibility, $name, $original)
{
if (in_array('public', $visibility) && in_array('protected', $visibility)) {
throw new CompilerException("Property '{$name}' cannot be 'public' and 'protected' at the same time", $original);
}
if (in_array('public', $visibility) && in_array('private', $visibility)) {
throw new CompilerException("Property '{$name}' cannot be 'public' and 'private' at the same time", $original);
}
if (in_array('private', $visibility) && in_array('protected', $visibility)) {
throw new CompilerException("Property '{$name}' cannot be 'protected' and 'private' at the same time", $original);
}
}