Skip to content

Commit

Permalink
cc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Nov 20, 2024
1 parent 444c415 commit a4e269b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/stanford_decoupled/stanford_decoupled.module
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function stanford_decoupled_token_info() {
return [];
}
$entity_types = \Drupal::entityTypeManager()->getDefinitions();
$info['tokens'] = [];
$info = [];

foreach ($entity_types as $entity_id => $entity_type) {
if ($entity_type->getGroup() == 'content') {
Expand All @@ -82,8 +82,7 @@ function stanford_decoupled_token_info() {
*/
function stanford_decoupled_tokens($type, $tokens, array $data = [], array $options = []) {
$replacements = [];
if (!empty($data[$type]) && method_exists($data[$type], 'uuid')) {
/** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
if (!empty($data[$type]) && $data[$type] instanceof ContentEntityInterface) {
$entity = $data[$type];

foreach ($tokens as $name => $original) {
Expand Down

0 comments on commit a4e269b

Please sign in to comment.