diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index d1b38ad225..542229b2fe 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -935,7 +935,7 @@ function node_form_system_themes_admin_form_submit($form, FormStateInterface $fo
 /**
  * Implements hook_node_access().
  */
-function node_node_access(NodeInterface $node, $op, $account) {
+function node_node_access(NodeInterface $node, $op, AccountInterface $account) {
   $type = $node->bundle();
 
   switch ($op) {
@@ -943,25 +943,25 @@ function node_node_access(NodeInterface $node, $op, $account) {
       return AccessResult::allowedIfHasPermission($account, 'create ' . $type . ' content');
 
     case 'update':
-      if ($account->hasPermission('edit any ' . $type . ' content', $account)) {
+      if ($account->hasPermission('edit any ' . $type . ' content')) {
         return AccessResult::allowed()->cachePerPermissions();
       }
-      else {
-        return AccessResult::allowedIf($account->hasPermission('edit own ' . $type . ' content', $account) && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node);
+      elseif ($account->hasPermission('edit own ' . $type . ' content')) {
+        return AccessResult::allowedIf($account->id() == $node->getOwnerId())->cachePerPermissions()->cachePerUser()->addCacheableDependency($node);
       }
+      break;
 
     case 'delete':
-      if ($account->hasPermission('delete any ' . $type . ' content', $account)) {
+      if ($account->hasPermission('delete any ' . $type . ' content')) {
         return AccessResult::allowed()->cachePerPermissions();
       }
-      else {
-        return AccessResult::allowedIf($account->hasPermission('delete own ' . $type . ' content', $account) && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node);
+      elseif ($account->hasPermission('delete own ' . $type . ' content')) {
+        return AccessResult::allowedIf($account->id() == $node->getOwnerId())->cachePerPermissions()->cachePerUser()->addCacheableDependency($node);
       }
-
-    default:
-      // No opinion.
-      return AccessResult::neutral();
+      break;
   }
+  // No opinion.
+  return AccessResult::neutral();
 }
 
 /**
