Commit 8774d0d0 authored by adriancid's avatar adriancid

Issue #3067551 by Juhi Rathi, romainj, AkashkumarOSL, adriancid: Fixing remaining Coding Standards

parent ad582ffe
......@@ -2,6 +2,8 @@ Admin Toolbar 8.x-2.0-XXXXX, 2019-XX-XX
---------------------------------------
Changes since 8.x-2.0-beta1:
- #3067551 by Juhi Rathi, romainj, AkashkumarOSL, adriancid: Fixing remaining
Coding Standards.
- #3077435 by super_romeo, adriancid: Final curly brace missin in the
admin_toolbar_links_access_filter_filter_non_accessible_links function.
- #3026731 by Al Munnings, romainj, idebr, adriancid: The implementation of the
......
......@@ -6,7 +6,6 @@
*/
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\user\Entity\Role;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Drupal\Core\Routing\RouteMatchInterface;
......@@ -84,7 +83,7 @@ function admin_toolbar_links_access_filter_filter_non_accessible_links(array &$i
admin_toolbar_links_access_filter_filter_non_accessible_links($items[$route]['below']);
}
if (empty($items[$route]['below']) && \Drupal::moduleHandler()
->moduleExists('admin_toolbar')) {
->moduleExists('admin_toolbar')) {
// Every child item has been cleared out.
// Now check, if the given route represents an overview page only,
......
......@@ -108,7 +108,8 @@ class ExtraLinks extends DeriverBase implements ContainerDeriverInterface {
// Normally, the edit form for the bundle would be its root link.
$content_entity_bundle_root = NULL;
if ($this->routeExists('entity.' . $content_entity_bundle . '.overview_form')) {
// Some bundles have an overview/list form that make a better root link.
// Some bundles have an overview/list form that make a better root
// link.
$content_entity_bundle_root = 'entity.' . $content_entity_bundle . '.overview_form.' . $machine_name;
$links[$content_entity_bundle_root] = [
'title' => $this->t($bundle->label()),
......@@ -609,7 +610,7 @@ class ExtraLinks extends DeriverBase implements ContainerDeriverInterface {
/**
* Determine if a route exists by name.
*
* @param $route_name
* @param string $route_name
* The name of the route to check.
*
* @return bool
......
......@@ -11,7 +11,7 @@ use Drupal\Tests\BrowserTestBase;
*
* @group admin_toolbar
*/
class AdminToolbarToolsTest extends BrowserTestBase {
class AdminToolbarToolsSortTest extends BrowserTestBase {
/**
* Modules to enable.
......
......@@ -36,7 +36,6 @@ class AdminToolbarSearchTest extends WebDriverTestBase {
*/
protected $adminUser;
/**
* {@inheritdoc}
*/
......@@ -215,7 +214,8 @@ class AdminToolbarSearchTest extends WebDriverTestBase {
$suggestions = $this->assertSession()
->waitForElementVisible('css', 'ul.ui-autocomplete');
// Assert there is only one suggestion with a link to /admin/structure/types/manage/article/fields.
// Assert there is only one suggestion with a link to
// /admin/structure/types/manage/article/fields.
$count = count($suggestions->findAll('xpath', '//span[contains(text(), "/admin/structure/types/manage/article/fields")]'));
$this->assertEquals(1, $count);
......@@ -253,7 +253,7 @@ class AdminToolbarSearchTest extends WebDriverTestBase {
}
/**
* Assert that the search suggestions contain a given string with a given input.
* Assert that the search suggestions contain a given string with given input.
*
* @param string $search
* The string to search for.
......@@ -272,7 +272,10 @@ class AdminToolbarSearchTest extends WebDriverTestBase {
}
/**
* Assert that the search suggestions does not contain a given string with a given input.
* Assert that the search suggestions does not contain a given string.
*
* Assert that the search suggestions does not contain a given string with a
* given input.
*
* @param string $search
* The string to search for.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment