Verified Commit 457fb8bc authored by Dave Long's avatar Dave Long
Browse files

Issue #3387988 by quietone, atul4drupal: Fix @return type, simple fixes

(cherry picked from commit 5e8d5e8a)
parent 946c240f
Loading
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -42,10 +42,7 @@ public function save($has_trusted_data = FALSE) {
  }

  /**
   * Deletes the configuration object.
   *
   * @return \Drupal\Core\Config\Config
   *   The configuration object.
   * {@inheritdoc}
   */
  public function delete() {
    throw new ImmutableConfigException("Can not delete immutable configuration {$this->getName()}. Use \\Drupal\\Core\\Config\\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object");
+1 −7
Original line number Diff line number Diff line
@@ -1455,9 +1455,6 @@ protected function addTableDefaults(&$schema) {
   *   The entity type.
   * @param array $schema
   *   The table schema, passed by reference.
   *
   * @return array
   *   A partial schema array for the base table.
   */
  protected function processDataTable(ContentEntityTypeInterface $entity_type, array &$schema) {
    // Marking the respective fields as NOT NULL makes the indexes more
@@ -1470,11 +1467,8 @@ protected function processDataTable(ContentEntityTypeInterface $entity_type, arr
   *
   * @param \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type
   *   The entity type.
   * @param array $schema
   * @param array &$schema
   *   The table schema, passed by reference.
   *
   * @return array
   *   A partial schema array for the base table.
   */
  protected function processRevisionDataTable(ContentEntityTypeInterface $entity_type, array &$schema) {
    // Marking the respective fields as NOT NULL makes the indexes more
+2 −5
Original line number Diff line number Diff line
@@ -221,11 +221,8 @@
/**
 * Alters all the menu links discovered by the menu link plugin manager.
 *
 * @param array $links
 *   The link definitions to be altered.
 *
 * @return array
 *   An array of discovered menu links. Each link has a key that is the machine
 * @param array &$links
 *   The link definitions to be altered. Each link has a key that is the machine
 *   name, which must be unique. By default, use the route name as the
 *   machine name. In cases where multiple links use the same route name, such
 *   as two links to the same page in different menus, or two links using the
+0 −3
Original line number Diff line number Diff line
@@ -688,9 +688,6 @@ function hook_theme_suggestions_HOOK(array $variables) {
 *   (in this case 'node__article') is available in
 *   $variables['theme_hook_original'].
 *
 * @return array
 *   An array of theme suggestions.
 *
 * @see hook_theme_suggestions_HOOK_alter()
 */
function hook_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
+0 −39
Original line number Diff line number Diff line
@@ -30,9 +30,6 @@ public function append($value): void {
   * @param int $flags
   *   The flags to sort the ArrayObject by.
   *
   * @return bool
   *   This method always returns TRUE.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -45,9 +42,6 @@ public function asort($flags = SORT_REGULAR): bool {
  /**
   * Count the ArrayObject.
   *
   * @return int
   *   The number of public properties in the \ArrayObject.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -62,9 +56,6 @@ public function count(): int {
   * @param array|object $array
   *   The array to replace for the current array.
   *
   * @return array
   *   The new array or object to exchange with the current array.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -76,9 +67,6 @@ public function exchangeArray($array): array {
  /**
   * Exports the \ArrayObject to an array.
   *
   * @return array
   *   Returns a copy of the array.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -90,9 +78,6 @@ public function getArrayCopy(): array {
  /**
   * Gets the behavior flags of the \ArrayObject.
   *
   * @return int
   *   Returns the behavior flags of the \ArrayObject.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -104,9 +89,6 @@ public function getFlags(): int {
  /**
   * Create a new iterator from an ArrayObject instance.
   *
   * @return \Iterator
   *   An iterator from the ArrayObject.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -118,9 +100,6 @@ public function getIterator(): \Iterator {
  /**
   * Gets the class name of the array iterator that is used by \ArrayObject::getIterator().
   *
   * @return string
   *   Returns the iterator class name that is used to iterate over this object.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -135,9 +114,6 @@ public function getIteratorClass(): string {
   * @param int $flags
   *   The flags to sort the ArrayObject by.
   *
   * @return bool
   *   This method always returns TRUE.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -150,9 +126,6 @@ public function ksort($flags = SORT_REGULAR): bool {
  /**
   * Sort an array using a case insensitive "natural order" algorithm.
   *
   * @return bool
   *   This method always returns TRUE.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -165,9 +138,6 @@ public function natcasesort(): bool {
  /**
   * Sort entries using a "natural order" algorithm.
   *
   * @return bool
   *   This method always returns TRUE.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -183,9 +153,6 @@ public function natsort(): bool {
   * @param mixed $key
   *   The index being checked.
   *
   * @return bool
   *   Return TRUE if the requested index exists, otherwise FALSE.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -279,9 +246,6 @@ public function setIteratorClass($iteratorClass): void {
   *   greater than zero if the first argument is considered to be respectively
   *   less than, equal to, or greater than the second.
   *
   * @return bool
   *   This method always returns TRUE.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
@@ -299,9 +263,6 @@ public function uasort($callback): bool {
   *   greater than zero if the first argument is considered to be respectively
   *   less than, equal to, or greater than the second.
   *
   * @return bool
   *   This method always returns TRUE.
   *
   * @throws \Exception
   *   This class does not support this action but it must implement it, because
   *   it is extending \ArrayObject.
Loading