diff -u b/core/modules/book/book.module b/core/modules/book/book.module --- b/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -227,9 +227,8 @@ * Implements hook_entity_extra_field_info(). */ function book_entity_extra_field_info() { - $return = array(); + $fields = []; $allowed_types = \Drupal::config('book.settings')->get('allowed_types'); - if ($allowed_types) { foreach ($allowed_types as $note_type) { $fields['node'][$note_type]['display']['book_navigation'] = [ @@ -239,8 +238,6 @@ ]; } } - - return $fields; }