Browse Source

Removing whitespace

pull/768/head
dannylamb 6 years ago committed by GitHub
parent
commit
3f94adf602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Plugin/ContextReaction/JsonldTypeAlterReaction.php

2
src/Plugin/ContextReaction/JsonldTypeAlterReaction.php

@ -44,11 +44,9 @@ class JsonldTypeAlterReaction extends NormalizerAlterReaction {
// Search for the entity in the graph. // Search for the entity in the graph.
foreach ($normalized['@graph'] as &$elem) { foreach ($normalized['@graph'] as &$elem) {
if (!is_array($elem['@type'])) { if (!is_array($elem['@type'])) {
$elem['@type'] = [$elem['@type']]; $elem['@type'] = [$elem['@type']];
} }
if ($elem['@id'] === $this->getSubjectUrl($entity)) { if ($elem['@id'] === $this->getSubjectUrl($entity)) {
foreach ($entity->get($config['source_field'])->getValue() as $type) { foreach ($entity->get($config['source_field'])->getValue() as $type) {
// If the configured field is using an entity reference, // If the configured field is using an entity reference,

Loading…
Cancel
Save