\Drupal calls should be avoided in classes, use dependency injection instead in NodeRevisionAccessCheck.php