core/lib/Drupal/Core/Entity/EntityManagerInterface.php | 8 ++++---- core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php | 5 ++--- .../Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php index 3199655..a1dea1d 100644 --- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php @@ -255,16 +255,16 @@ public function getHandler($entity_type, $handler_type); * Creates new handler instance. * * Usually \Drupal\Core\Entity\EntityManagerInterface::getHandler() is - * preferred since this has additional checking that the class exists and - * has static caches. + * preferred since that method has additional checking that the class exists + * and has static caches. * - * @param $class + * @param mixed $class * The handler class to instantiate. * @param \Drupal\Core\Entity\EntityTypeInterface $definition * The entity type definition. * * @return mixed - * A handler instance + * A handler instance. */ public function createHandlerInstance($class, EntityTypeInterface $definition = null); diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 8ce34d0..36459b7 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -180,9 +180,8 @@ public function requiresFieldStorageSchemaChanges(FieldStorageDefinitionInterfac public function requiresEntityDataMigration(EntityTypeInterface $entity_type, EntityTypeInterface $original) { $original_storage_class = $original->getStorageClass(); - // If the original storage class is different, then there might be - // existing entities in that storage even if the new storage's base - // table is empty. + // If the original storage class is different, then there might be existing + // entities in that storage even if the new storage's base table is empty. if ($entity_type->getStorageClass() != $original_storage_class) { if (!class_exists($original_storage_class)) { return TRUE; diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php index 7ff89a7..5abcaaf 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @@ -1200,11 +1200,11 @@ public function testHasData() { ->method('execute') ->will($this->returnValue($select_fetch_field)); - $select_fields = $this->getMockBuilder('\Drupal\Core\Database\Query\Select') + $select_count_query = $this->getMockBuilder('\Drupal\Core\Database\Query\Select') ->disableOriginalConstructor() ->getMock(); - $select_fields->expects($this->once()) + $select_count_query->expects($this->once()) ->method('countQuery') ->will($this->returnValue($select_execute)); @@ -1214,7 +1214,7 @@ public function testHasData() { $database_select->expects($this->once()) ->method('fields') - ->will($this->returnValue($select_fields)); + ->will($this->returnValue($select_count_query)); $database = $this->getMockBuilder('Drupal\Core\Database\Connection') ->disableOriginalConstructor()