diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaDatatypeCallbackTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaDatatypeCallbackTest.php index 459d509..91153df 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaDatatypeCallbackTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaDatatypeCallbackTest.php @@ -6,6 +6,9 @@ namespace Drupal\rdf\Tests\Field; +/** + * Tests the RDFa output of a text field formatter with a datatype callback. + */ class FieldRdfaDatatypeCallbackTest extends FieldRdfaTestBase { /** @@ -20,8 +23,8 @@ class FieldRdfaDatatypeCallbackTest extends FieldRdfaTestBase { public static function getInfo() { return array( - 'name' => 'Field formatter - datatype callback', - 'description' => 'Tests RDFa output for field formatters with a datatype callback.', + 'name' => 'Field formatter: datatype callback', + 'description' => 'Tests RDFa output for field formatters with a datatype callback.', 'group' => 'RDF', ); } @@ -56,5 +59,6 @@ public function testDefaultFormatter() { // Expected value is the output of the datatype callback, not the raw value. $this->assertFormatterRdfa('text_default', 'http://schema.org/interactionCount', 'foo' . $this->test_value); } + } diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php index a620d5e..38ee919 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php @@ -9,6 +9,9 @@ use Drupal\rdf\Tests\Field\FieldRdfaTestBase; use Drupal\Core\Language\Language; +/** + * Tests the RDFa output of the taxonomy term reference field formatter. + */ class TaxonomyTermReferenceRdfaTest extends FieldRdfaTestBase { /** @@ -37,8 +40,8 @@ class TaxonomyTermReferenceRdfaTest extends FieldRdfaTestBase { public static function getInfo() { return array( - 'name' => 'Field formatter - taxonomy term reference', - 'description' => 'Tests RDFa output by taxonomy term reference field formatters.', + 'name' => 'Field formatter: taxonomy term reference', + 'description' => 'Tests RDFa output by taxonomy term reference field formatters.', 'group' => 'RDF', ); } diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TestDataConverter.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TestDataConverter.php index 7f3127c..35b267a 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TestDataConverter.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TestDataConverter.php @@ -14,7 +14,7 @@ class TestDataConverter { /** * Converts data into a string for placement into a content attribute. * - * @param mixed $data + * @param array $data * The data to be altered and placed in the content attribute. * * @return string diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index 8ca5e6f..578f4b3 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -204,8 +204,8 @@ function rdf_entity_prepare_view($entity_type, array $entities, array $displays) // attributes to be added inside field formatters. foreach ($entities as $entity) { $mapping = rdf_get_mapping($entity_type, $entity->bundle()); - // Only prepare the RDFa attributes for the fields which are configured - // to be displayed. + // Only prepare the RDFa attributes for the fields which are configured to + // be displayed. foreach ($displays[$entity->bundle()]->getComponents() as $name => $options) { $field_mapping = $mapping->getPreparedFieldMapping($name); if ($field_mapping['properties']) { @@ -346,8 +346,7 @@ function rdf_preprocess_field(&$variables) { // output, add these attributes to the field template. foreach ($variables['element']['#items'] as $delta => $item) { if (!empty($item['html_data_attributes'])) { - // Merge HTML data attributes in item_attributes. - // @todo https://drupal.org/node/2034003 + // Merge HTML data attributes with item_attributes. $variables['item_attributes'][$delta] = new Attribute($item['html_data_attributes']); } }