diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 2c35126..6fb684e 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -716,7 +716,7 @@ public function onChange($name) { // If the revision identifier field is being populated with the original // value, we need to make sure the "new revision" flag is reset // accordingly. - if ($key == 'revision') { + if ($key === 'revision') { $revision_id = $this->getRevisionId(); if ($revision_id == $this->getLoadedRevisionId()) { $this->newRevision = FALSE; diff --git a/core/lib/Drupal/Core/Entity/Query/Queries.php b/core/lib/Drupal/Core/Entity/Query/Queries.php index b11228a..9f129a1 100644 --- a/core/lib/Drupal/Core/Entity/Query/Queries.php +++ b/core/lib/Drupal/Core/Entity/Query/Queries.php @@ -71,5 +71,4 @@ public function getLatestRevisionId(EntityInterface $entity) { return key($result); } - } diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php index f21ce04..bb07e47 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php @@ -173,7 +173,6 @@ public function testInvalidStateMultilingual() { $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example'); $workflow->save(); - /** @var \Drupal\node\NodeInterface $node */ $node = Node::create([ 'type' => 'example', 'title' => 'English Published Node', @@ -182,7 +181,6 @@ public function testInvalidStateMultilingual() { ]); $node->save(); - /** @var \Drupal\node\NodeInterface $node_fr */ $node_fr = $node->addTranslation('fr'); $node_fr->setTitle('French Published Node'); $node_fr->save();