diff --git a/core/modules/contextual/contextual.api.php b/core/modules/contextual/contextual.api.php
index d972045..17e4cbe 100644
--- a/core/modules/contextual/contextual.api.php
+++ b/core/modules/contextual/contextual.api.php
@@ -18,12 +18,13 @@
* is passed in by reference. Further links may be added or existing links can
* be altered.
*
- * @param $element
+ * @param array $element
* A renderable array representing the contextual links.
- * @param $items
+ * @param array $items
* An associative array containing the original contextual link items, as
* generated by
- * \Drupal\Core\Menu\ContextualLinkManagerInterface::getContextualLinksArrayByGroup(),
+ * \Drupal\Core\Menu\ContextualLinkManagerInterface::
+ * getContextualLinksArrayByGroup(),
* which were used to build $element['#links'].
*
* @see hook_contextual_links_alter()
diff --git a/core/modules/contextual/css/contextual.icons.css b/core/modules/contextual/css/contextual.icons.css
index 2a755ca..7b2bd6e 100644
--- a/core/modules/contextual/css/contextual.icons.css
+++ b/core/modules/contextual/css/contextual.icons.css
@@ -34,8 +34,8 @@
/* Override the .focusable height: auto */
width: 28px !important;
text-indent: -9999px;
-
}
+
.no-svg .contextual .trigger {
background-image: url("../../../misc/icons/bebebe/pencil.png");
}
diff --git a/core/modules/contextual/css/contextual.toolbar.css b/core/modules/contextual/css/contextual.toolbar.css
index 88442a4..320aafb 100644
--- a/core/modules/contextual/css/contextual.toolbar.css
+++ b/core/modules/contextual/css/contextual.toolbar.css
@@ -23,10 +23,10 @@
padding-right: 1.3333em;
}
.toolbar .toolbar-bar .contextual-toolbar-tab button.active {
- background-image:-moz-linear-gradient(rgb(78,159,234) 0%,rgb(69,132,221) 100%);
- background-image:-webkit-gradient(linear,color-stop(0, rgb(78,159,234)),color-stop(1, rgb(69,132,221)));
+ background-image: -moz-linear-gradient(rgb(78,159,234) 0%,rgb(69,132,221) 100%);
+ background-image: -webkit-gradient(linear,color-stop(0, rgb(78,159,234)),color-stop(1, rgb(69,132,221)));
background-image: -webkit-linear-gradient(top, rgb(78,159,234) 0%, rgb(69,132,221) 100%);
- background-image:linear-gradient(rgb(78,159,234) 0%,rgb(69,132,221) 100%);
+ background-image: linear-gradient(rgb(78,159,234) 0%,rgb(69,132,221) 100%);
}
/* @todo get rid of this declaration by making toolbar.module's CSS less specific */
diff --git a/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php
index 2f6004a..ee8e988 100644
--- a/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php
+++ b/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php
@@ -27,6 +27,9 @@ public function usesGroupBy() {
return FALSE;
}
+ /**
+ * Define options for Contextual links.
+ */
protected function defineOptions() {
$options = parent::defineOptions();
@@ -36,6 +39,9 @@ protected function defineOptions() {
return $options;
}
+ /**
+ * Build options form for Contextual links.
+ */
public function buildOptionsForm(&$form, &$form_state) {
$all_fields = $this->view->display_handler->getFieldLabels();
// Offer to include only those fields that follow this one.
@@ -59,6 +65,9 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
+ /**
+ * Pre render values for Contextual links.
+ */
public function preRender(&$values) {
// Add a row plugin css class for the contextual link.
$class = 'contextual-region';
@@ -116,8 +125,8 @@ public function render(ResultRow $values) {
array(),
array(
'contextual-views-field-links' => drupal_encode_path(Json::encode($links)),
- )
- )
+ ),
+ ),
);
$element = array(
@@ -130,7 +139,9 @@ public function render(ResultRow $values) {
return '';
}
}
-
- public function query() { }
+ /**
+ * Function query.
+ */
+ public function query() {}
}
diff --git a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
index 4e1e6d0..b4399fc 100644
--- a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
+++ b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
@@ -23,6 +23,9 @@ class ContextualDynamicContextTest extends WebTestBase {
*/
public static $modules = array('contextual', 'node', 'views', 'views_ui');
+ /**
+ * Get info of Contextual links.
+ */
public static function getInfo() {
return array(
'name' => 'Contextual links on node lists',
@@ -31,13 +34,20 @@ public static function getInfo() {
);
}
- function setUp() {
+ /**
+ * Setup info of Contextual links.
+ */
+ public function setUp() {
parent::setUp();
$this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
$this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
- $this->editor_user = $this->drupalCreateUser(array('access content', 'access contextual links', 'edit any article content'));
+ $this->editor_user = $this->drupalCreateUser(array(
+ 'access content',
+ 'access contextual links',
+ 'edit any article content',
+ ));
$this->authenticated_user = $this->drupalCreateUser(array('access content', 'access contextual links'));
$this->anonymous_user = $this->drupalCreateUser(array('access content'));
}
@@ -48,7 +58,7 @@ function setUp() {
* Ensures that contextual link placeholders always exist, even if the user is
* not allowed to use contextual links.
*/
- function testDifferentPermissions() {
+ public function testDifferentPermissions() {
$this->drupalLogin($this->editor_user);
// Create three nodes in the following order:
@@ -120,18 +130,20 @@ function testDifferentPermissions() {
* A contextual link id.
*
* @return bool
+ * returns TRUE if it is successful, otherwise FALSE.
*/
protected function assertContextualLinkPlaceHolder($id) {
$this->assertRaw('
$id)) . '>
', format_string('Contextual link placeholder with id @id exists.', array('@id' => $id)));
}
/**
- * Asserts that a contextual link placeholder with the given id does not exist.
+ * Asserts that a contextual link placeholder with given id does not exist.
*
* @param string $id
* A contextual link id.
*
* @return bool
+ * returns TRUE if it is successful, otherwise FALSE.
*/
protected function assertNoContextualLinkPlaceHolder($id) {
$this->assertNoRaw(' $id)) . '>
', format_string('Contextual link placeholder with id @id does not exist.', array('@id' => $id)));
diff --git a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualUnitTest.php b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualUnitTest.php
index fcb3a03..7b128ca 100644
--- a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualUnitTest.php
+++ b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualUnitTest.php
@@ -21,6 +21,9 @@ class ContextualUnitTest extends DrupalUnitTestBase {
*/
public static $modules = array('contextual');
+ /**
+ * Get info of Contextual links.
+ */
public static function getInfo() {
return array(
'name' => 'Conversion to and from "contextual id"s (for placeholders)',
@@ -30,9 +33,9 @@ public static function getInfo() {
}
/**
- * Provides testcases for testContextualLinksToId() and
+ * Provides testcases for testContextualLinksToId().
*/
- function _contextual_links_id_testcases() {
+ public function contextualLinksIdTestcases() {
// Test branch conditions:
// - one group.
// - one dynamic path argument.
@@ -43,7 +46,7 @@ function _contextual_links_id_testcases() {
'route_parameters' => array(
'node' => '14031991',
),
- 'metadata' => array()
+ 'metadata' => array(),
),
),
'id' => 'node:node=14031991:',
@@ -56,10 +59,10 @@ function _contextual_links_id_testcases() {
$tests[] = array(
'links' => array(
'foo' => array(
- 'route_parameters'=> array(
- 'bar',
+ 'route_parameters' => array(
+ 1 => 'bar',
'key' => 'baz',
- 'qux',
+ 2 => 'qux',
),
'metadata' => array(),
),
@@ -75,7 +78,7 @@ function _contextual_links_id_testcases() {
'links' => array(
'views_ui_edit' => array(
'route_parameters' => array(
- 'view' => 'frontpage'
+ 'view' => 'frontpage',
),
'metadata' => array(
'location' => 'page',
@@ -99,9 +102,9 @@ function _contextual_links_id_testcases() {
),
'foo' => array(
'route_parameters' => array(
- 'bar',
+ 1 => 'bar',
'key' => 'baz',
- 'qux',
+ 2 => 'qux',
),
'metadata' => array(),
),
@@ -119,8 +122,8 @@ function _contextual_links_id_testcases() {
/**
* Tests _contextual_links_to_id().
*/
- function testContextualLinksToId() {
- $tests = $this->_contextual_links_id_testcases();
+ public function testContextualLinksToId() {
+ $tests = $this->contextualLinksIdTestcases();
foreach ($tests as $test) {
$this->assertIdentical(_contextual_links_to_id($test['links']), $test['id']);
}
@@ -129,8 +132,8 @@ function testContextualLinksToId() {
/**
* Tests _contextual_id_to_links().
*/
- function testContextualIdToLinks() {
- $tests = $this->_contextual_links_id_testcases();
+ public function testContextualIdToLinks() {
+ $tests = $this->contextualLinksIdTestcases();
foreach ($tests as $test) {
$this->assertIdentical(_contextual_id_to_links($test['id']), $test['links']);
}
diff --git a/core/profiles/minimal/lib/Drupal/minimal/Tests/MinimalTest.php b/core/profiles/minimal/lib/Drupal/minimal/Tests/MinimalTest.php
index fbfb65b..bd7bf9a 100644
--- a/core/profiles/minimal/lib/Drupal/minimal/Tests/MinimalTest.php
+++ b/core/profiles/minimal/lib/Drupal/minimal/Tests/MinimalTest.php
@@ -16,6 +16,9 @@ class MinimalTest extends WebTestBase {
protected $profile = 'minimal';
+ /**
+ * Tests Minimal installation profile expectations.
+ */
public static function getInfo() {
return array(
'name' => 'Minimal installation profile',
@@ -27,7 +30,7 @@ public static function getInfo() {
/**
* Tests Minimal installation profile.
*/
- function testMinimal() {
+ public function testMinimal() {
$this->drupalGet('');
// Check the login block is present.
$this->assertLink(t('Create new account'));
diff --git a/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php b/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php
index 9857b83..8611fc9 100644
--- a/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php
+++ b/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php
@@ -16,6 +16,9 @@ class StandardTest extends WebTestBase {
protected $profile = 'standard';
+ /**
+ * Tests Standard installation profile expectations.
+ */
public static function getInfo() {
return array(
'name' => 'Standard installation profile',
@@ -27,7 +30,7 @@ public static function getInfo() {
/**
* Tests Standard installation profile.
*/
- function testStandard() {
+ public function testStandard() {
$this->drupalGet('');
$this->assertLink(t('Contact'));
$this->clickLink(t('Contact'));
diff --git a/core/profiles/testing/modules/drupal_system_listing_compatible_test/lib/Drupal/drupal_system_listing_compatible_test/Tests/SystemListingCompatibleTest.php b/core/profiles/testing/modules/drupal_system_listing_compatible_test/lib/Drupal/drupal_system_listing_compatible_test/Tests/SystemListingCompatibleTest.php
index 3df9188..a5345ac 100644
--- a/core/profiles/testing/modules/drupal_system_listing_compatible_test/lib/Drupal/drupal_system_listing_compatible_test/Tests/SystemListingCompatibleTest.php
+++ b/core/profiles/testing/modules/drupal_system_listing_compatible_test/lib/Drupal/drupal_system_listing_compatible_test/Tests/SystemListingCompatibleTest.php
@@ -2,7 +2,8 @@
/**
* @file
- * Definition of Drupal\drupal_system_listing_compatible_test\Tests\SystemListingCompatibleTest.
+ * Definition of Drupal\drupal_system_listing_compatible_test\
+ * Tests\SystemListingCompatibleTest.
*/
namespace Drupal\drupal_system_listing_compatible_test\Tests;
@@ -34,6 +35,9 @@ class SystemListingCompatibleTest extends WebTestBase {
*/
protected $profile = 'minimal';
+ /**
+ * Use the Minimal profile.
+ */
public static function getInfo() {
return array(
'name' => 'Installation profile module tests helper',
@@ -45,7 +49,7 @@ public static function getInfo() {
/**
* Non-empty test* method required to executed the test case class.
*/
- function testSystemListing() {
+ public function testSystemListing() {
$this->pass(__CLASS__ . ' test executed.');
}
}