From 4907fa7f72f373ef0b667fbccc71fc41ceaaf65f Mon Sep 17 00:00:00 2001 From: Lee Rowlands <lee.rowlands@previousnext.com.au> Date: Wed, 21 Aug 2019 18:24:55 +1000 Subject: [PATCH] Issue #3075404 by eiriksm: Wrong return type in several access_check service docblocks --- core/modules/node/src/Access/NodeAddAccessCheck.php | 4 ++-- core/modules/node/src/Access/NodePreviewAccessCheck.php | 4 ++-- core/modules/system/src/Access/DbUpdateAccessCheck.php | 4 ++-- .../router_test_directory/src/Access/TestAccessCheck.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/modules/node/src/Access/NodeAddAccessCheck.php b/core/modules/node/src/Access/NodeAddAccessCheck.php index 3ae796b521aa..5e6a0468251a 100644 --- a/core/modules/node/src/Access/NodeAddAccessCheck.php +++ b/core/modules/node/src/Access/NodeAddAccessCheck.php @@ -48,8 +48,8 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager) { * (optional) The node type. If not specified, access is allowed if there * exists at least one node type for which the user may create a node. * - * @return string - * A \Drupal\Core\Access\AccessInterface constant value. + * @return \Drupal\Core\Access\AccessResultInterface + * The access result. */ public function access(AccountInterface $account, NodeTypeInterface $node_type = NULL) { $access_control_handler = $this->entityTypeManager->getAccessControlHandler('node'); diff --git a/core/modules/node/src/Access/NodePreviewAccessCheck.php b/core/modules/node/src/Access/NodePreviewAccessCheck.php index 6515577306d4..3b3c051abbe8 100644 --- a/core/modules/node/src/Access/NodePreviewAccessCheck.php +++ b/core/modules/node/src/Access/NodePreviewAccessCheck.php @@ -46,8 +46,8 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager) { * @param \Drupal\node\NodeInterface $node_preview * The node that is being previewed. * - * @return string - * A \Drupal\Core\Access\AccessInterface constant value. + * @return \Drupal\Core\Access\AccessResultInterface + * The access result. */ public function access(AccountInterface $account, NodeInterface $node_preview) { if ($node_preview->isNew()) { diff --git a/core/modules/system/src/Access/DbUpdateAccessCheck.php b/core/modules/system/src/Access/DbUpdateAccessCheck.php index 2bcc5fb0ab40..1d93c27cb55f 100644 --- a/core/modules/system/src/Access/DbUpdateAccessCheck.php +++ b/core/modules/system/src/Access/DbUpdateAccessCheck.php @@ -18,8 +18,8 @@ class DbUpdateAccessCheck implements AccessInterface { * @param \Drupal\Core\Session\AccountInterface $account * The currently logged in account. * - * @return string - * A \Drupal\Core\Access\AccessInterface constant value. + * @return \Drupal\Core\Access\AccessResultInterface + * The access result. */ public function access(AccountInterface $account) { // Allow the global variable in settings.php to override the access check. diff --git a/core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php b/core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php index 0cbe9db9dac0..a1437999dbf3 100644 --- a/core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php +++ b/core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php @@ -13,8 +13,8 @@ class TestAccessCheck implements AccessInterface { /** * Checks access. * - * @return string - * A \Drupal\Core\Access\AccessInterface constant value. + * @return \Drupal\Core\Access\AccessResultInterface + * The access result. */ public function access() { // No opinion, so other access checks should decide if access should be -- GitLab