From 6fa26131992660672378c47ce3518e0a44cd1142 Mon Sep 17 00:00:00 2001 From: Eli Zoller Date: Mon, 12 Aug 2019 09:59:58 -0700 Subject: [PATCH] phpcs got me --- src/EventGenerator/EventGenerator.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/EventGenerator/EventGenerator.php b/src/EventGenerator/EventGenerator.php index f04b5bb0..a7038ffb 100644 --- a/src/EventGenerator/EventGenerator.php +++ b/src/EventGenerator/EventGenerator.php @@ -154,12 +154,16 @@ class EventGenerator implements EventGeneratorInterface } /** - * @param $entity EntityInterface - * returns Boolean + * Method to check if an entity is a new revision. + * + * @param \Drupal\Core\Entity\EntityInterface $entity + * Drupal Entity. + * + * @return bool + * Is new version. */ protected function isNewRevision(EntityInterface $entity) { - // revisions tab. $bundle_entity_type = $entity->getEntityType()->getBundleEntityType(); $bundle_entity = \Drupal::entityTypeManager()->getStorage($bundle_entity_type)->load($entity->bundle()); return $bundle_entity->shouldCreateNewRevision();