diff --git a/core/modules/help/src/Controller/HelpController.php b/core/modules/help/src/Controller/HelpController.php index 0453375..525da70 100644 --- a/core/modules/help/src/Controller/HelpController.php +++ b/core/modules/help/src/Controller/HelpController.php @@ -154,11 +154,11 @@ protected function fourColumnList($links) { * A string containing the formatted list. */ protected function helpTopicsList() { + /* @var \Drupal\help\HelpTopicInterface[] $entities */ $entities = $this->helpStorage->loadMultiple(); uasort($entities, array('Drupal\help\Entity\HelpTopic', 'sort')); $topics = array(); - /* @var \Drupal\help\HelpTopicInterface $entity */ foreach ($entities as $entity) { if ($entity->isTopLevel()) { $topics[] = array( diff --git a/core/modules/help/src/Entity/HelpTopic.php b/core/modules/help/src/Entity/HelpTopic.php index 7c7131d..2246ff2 100644 --- a/core/modules/help/src/Entity/HelpTopic.php +++ b/core/modules/help/src/Entity/HelpTopic.php @@ -149,15 +149,15 @@ protected function cleanTopicList($topics) { } // Make a list of non-empty trimmed IDs. - $tosave = array(); + $save = array(); foreach ($topics as $item) { $item = trim($item); if ($item) { - $tosave[] = $item; + $save[] = $item; } } - return $tosave; + return $save; } /** diff --git a/core/modules/help/src/HelpViewBuilder.php b/core/modules/help/src/HelpViewBuilder.php index f27d9a7..07c8b59 100644 --- a/core/modules/help/src/HelpViewBuilder.php +++ b/core/modules/help/src/HelpViewBuilder.php @@ -9,10 +9,8 @@ use Drupal\Component\Utility\String; use Drupal\Core\Entity\EntityViewBuilder; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityManagerInterface; -use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Utility\Token; @@ -40,11 +38,11 @@ class HelpViewBuilder extends EntityViewBuilder { /** * Creates a new HelpViewBuilder. * - * @param \Drupal\Entity\EntityTypeInterface $entity_type + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type object. - * @param \Drupal\Entity\EntityManagerInterface $entity_manager + * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager object. - * @param \Drupal\Language\LanguageManagerInterface $language_manager + * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager object. * @param \Drupal\Core\Utility\Token $token * The token replacement service class. @@ -64,7 +62,12 @@ public function __construct(EntityTypeInterface $entity_type, EntityManagerInter * {@inheritdoc} */ public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { - return new static($entity_type, $container->get('entity.manager'), $container->get('language_manager'), $container->get('token'), $container->get('entity.query')); + return new static($entity_type, + $container->get('entity.manager'), + $container->get('language_manager'), + $container->get('token'), + $container->get('entity.query') + ); } /** diff --git a/core/modules/help/src/Tests/HelpTopicAdminTest.php b/core/modules/help/src/Tests/HelpTopicAdminTest.php index 291fe47..d00488f 100644 --- a/core/modules/help/src/Tests/HelpTopicAdminTest.php +++ b/core/modules/help/src/Tests/HelpTopicAdminTest.php @@ -59,7 +59,7 @@ public function testHelpAdmin() { */ protected function verifyHelpAdmin($response = 200) { // Verify admin links. - foreach(array('admin/config', 'admin/config/development', 'admin/index') as $page) { + foreach (array('admin/config', 'admin/config/development', 'admin/index') as $page) { $this->drupalGet($page); if ($response == 200) { $this->assertText('Add, delete, and edit help topics'); diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc index 6133653..5970e73 100644 --- a/core/modules/system/system.tokens.inc +++ b/core/modules/system/system.tokens.inc @@ -87,7 +87,7 @@ function system_token_info() { continue; } $routes[$route_name] = array( - 'name' => t('URL to !route_name', ['!route_name' => $route_name]), + 'name' => t('URL to !route_name', array('!route_name' => $route_name)), 'description' => t('The URL to the !route_name route.', array('!route_name' => $route_name)), ); }