Verified Commit 14eba7b7 authored by Dave Long's avatar Dave Long
Browse files

Issue #3544746 by mstrelan, borisson_: Use phpdoc conditional returns for access functions

(cherry picked from commit be6b4392)
parent 3c7cc933
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ interface AccessManagerInterface {
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
@@ -46,7 +46,7 @@ public function checkNamedRoute($route_name, array $parameters = [], ?AccountInt
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
@@ -71,7 +71,7 @@ public function checkRequest(Request $request, ?AccountInterface $account = NULL
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ interface AccessibleInterface {
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public function executeMultiple(array $objects);
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public function label();
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
+3 −3
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ interface EntityAccessControlHandlerInterface {
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
@@ -53,7 +53,7 @@ public function access(EntityInterface $entity, $operation, ?AccountInterface $a
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
@@ -101,7 +101,7 @@ public function setModuleHandler(ModuleHandlerInterface $module_handler);
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
Loading