 core/modules/migrate/src/MigrationStorage.php       |  6 +++---
 .../src/Plugin/MigrateDestinationInterface.php      | 11 ++++++-----
 .../src/Plugin/migrate/destination/Entity.php       | 13 +++++++------
 .../Plugin/migrate/destination/EntityConfigBase.php | 12 ++++++------
 .../migrate/destination/EntityContentBase.php       |  4 ++--
 .../migrate/src/Plugin/migrate/id_map/Sql.php       |  7 ++++---
 .../src/Plugin/migrate/process/Migration.php        |  2 +-
 .../migrate/src/Tests/MigrateMessageTest.php        |  2 +-
 core/modules/migrate/src/Tests/MigrateTestBase.php  |  6 +++---
 .../migrate/tests/src/Unit/MigrateSqlIdMapTest.php  | 10 ++++++++--
 core/modules/migrate/tests/src/Unit/SqlBaseTest.php | 21 +++++++++++++--------
 .../Plugin/migrate/cckfield/CckFieldPluginBase.php  |  2 +-
 12 files changed, 55 insertions(+), 41 deletions(-)

diff --git a/core/modules/migrate/src/MigrationStorage.php b/core/modules/migrate/src/MigrationStorage.php
index e43496e..36390e0 100644
--- a/core/modules/migrate/src/MigrationStorage.php
+++ b/core/modules/migrate/src/MigrationStorage.php
@@ -170,19 +170,19 @@ public function buildDependencyMigration(array $migrations, array $dynamic_ids)
   }
 
   /**
    * Add one or more dependencies to a graph.
    *
    * @param array $graph
-   *   The graph so far.
+   *   The graph so far, passed by reference.
    * @param int $id
-   *   The migration id.
+   *   The migration ID.
    * @param string $dependency
    *   The dependency string.
    * @param array $dynamic_ids
-   *   The dynamic id mapping.
+   *   The dynamic ID mapping.
    */
   protected function addDependency(array &$graph, $id, $dependency, $dynamic_ids) {
     $dependencies = isset($dynamic_ids[$dependency]) ? $dynamic_ids[$dependency] : array($dependency);
     if (!isset($graph[$id]['edges'])) {
       $graph[$id]['edges'] = array();
     }
diff --git a/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php b/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php
index 8134883..08a12e5 100644
--- a/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php
+++ b/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php
@@ -22,21 +22,21 @@
  *
  * @ingroup migration
  */
 interface MigrateDestinationInterface extends PluginInspectionInterface {
 
   /**
-   * Get the destination ids.
+   * Get the destination IDs.
    *
    * To support MigrateIdMap maps, derived destination classes should return
    * schema field definition(s) corresponding to the primary key of the
    * destination being implemented. These are used to construct the destination
    * key fields of the map table for a migration using this destination.
    *
    * @return array
-   *   An array of ids.
+   *   An array of IDs.
    */
   public function getIds();
 
   /**
    * Returns an array of destination fields.
    *
@@ -44,13 +44,13 @@ public function getIds();
    * destination fields.
    *
    * @todo Review the cases where we need the Migration parameter,
    * can we avoid that?
    *
    * @param \Drupal\migrate\Entity\MigrationInterface $migration
-   *   (optional) the migration containing this destination.
+   *   (optional) The migration containing this destination.
    *
    * @return array
    *   - Keys: machine names of the fields
    *   - Values: Human-friendly descriptions of the fields.
    */
   public function fields(MigrationInterface $migration = NULL);
@@ -61,16 +61,16 @@ public function fields(MigrationInterface $migration = NULL);
    * Derived classes must implement import(), to construct one new object
    * (pre-populated) using ID mappings in the Migration.
    *
    * @param \Drupal\migrate\Row $row
    *   The row object.
    * @param array $old_destination_id_values
-   *   The old destination ids.
+   *   (optional) The old destination IDs. Defaults to an empty array.
    *
    * @return mixed
-   *   The entity id or an indication of success.
+   *   The entity ID or an indication of success.
    */
   public function import(Row $row, array $old_destination_id_values = array());
 
   /**
    * Delete the specified destination object from the target Drupal.
    *
@@ -92,7 +92,8 @@ public function supportsRollback();
    *
    * @return int
    *   The MigrateIdMapInterface::ROLLBACK_ constant indicating how an imported
    *   item should be handled on rollback.
    */
   public function rollbackAction();
+
 }
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
index 64123d6..f9128cc 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
@@ -74,16 +74,16 @@ public static function create(ContainerInterface $container, array $configuratio
       $container->get('entity.manager')->getStorage($entity_type_id),
       array_keys($container->get('entity.manager')->getBundleInfo($entity_type_id))
     );
   }
 
   /**
-   * Finds the entity type from configuration or plugin id.
+   * Finds the entity type from configuration or plugin ID.
    *
    * @param string $plugin_id
-   *   The plugin id.
+   *   The plugin ID.
    *
    * @return string
    *   The entity type.
    */
   protected static function getEntityTypeId($plugin_id) {
     // Remove "entity:"
@@ -100,16 +100,16 @@ public function fields(MigrationInterface $migration = NULL) {
   /**
    * Creates or loads an entity.
    *
    * @param \Drupal\migrate\Row $row
    *   The row object.
    * @param array $old_destination_id_values
-   *   The old destination ids.
+   *   The old destination IDs.
    *
    * @return \Drupal\Core\Entity\EntityInterface
-   *   The entity we're importing into.
+   *   The entity we are importing into.
    */
   protected function getEntity(Row $row, array $old_destination_id_values) {
     $entity_id = $old_destination_id_values ? reset($old_destination_id_values) : $this->getEntityId($row);
     if (!empty($entity_id) && ($entity = $this->storage->load($entity_id))) {
       $this->updateEntity($entity, $row);
     }
@@ -122,18 +122,19 @@ protected function getEntity(Row $row, array $old_destination_id_values) {
       $entity->enforceIsNew();
     }
     return $entity;
   }
 
   /**
-   * Get the entity id of the row.
+   * Get the entity ID of the row.
    *
    * @param \Drupal\migrate\Row $row
    *   The row of data.
+   *
    * @return string
-   *   The entity id for the row we're importing.
+   *   The entity ID for the row we are importing.
    */
   protected function getEntityId(Row $row) {
     return $row->getDestinationProperty($this->getKey('id'));
   }
 
   /**
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
index 5e5fbd5..b9e2e7c 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
@@ -15,13 +15,13 @@
 
 /**
  * Class for importing configuration entities.
  *
  * This class serves as the import class for most configuration entities.
  * It can be necessary to provide a specific entity class if the configuration
- * entity has a compound id (see EntityFieldEntity) or it has specific setter
+ * entity has a compound ID (see EntityFieldEntity) or it has specific setter
  * methods (see EntityDateFormat). When implementing an entity destination for
  * the latter case, make sure to add a test not only for importing but also
  * for re-importing (if that is supported).
  */
 class EntityConfigBase extends Entity {
 
@@ -36,20 +36,20 @@ public function import(Row $row, array $old_destination_id_values = array()) {
     $ids = $this->getIds();
     $id_key = $this->getKey('id');
     if (count($ids) > 1) {
       // Ids is keyed by the key name so grab the keys.
       $id_keys = array_keys($ids);
       if (!$row->getDestinationProperty($id_key)) {
-        // Set the id into the destination in for form "val1.val2.val3".
+        // Set the ID into the destination in for form "val1.val2.val3".
         $row->setDestinationProperty($id_key, $this->generateId($row, $id_keys));
       }
     }
     $entity = $this->getEntity($row, $old_destination_id_values);
     $entity->save();
     if (count($ids) > 1) {
-      // This can only be a config entity, content entities have their id key
+      // This can only be a config entity, content entities have their ID key
       // and that's it.
       $return = array();
       foreach ($id_keys as $id_key) {
         $return[] = $entity->get($id_key);
       }
       return $return;
@@ -102,21 +102,21 @@ protected function updateEntityProperty(EntityInterface $entity, array $parents,
       $entity_value = $value;
     }
     $entity->set($top_key, $entity_value);
   }
 
   /**
-   * Generate an entity id.
+   * Generate an entity ID.
    *
    * @param \Drupal\migrate\Row $row
    *   The current row.
    * @param array $ids
-   *   The destination ids.
+   *   The destination IDs.
    *
    * @return string
-   *   The generated entity id.
+   *   The generated entity ID.
    */
   protected function generateId(Row $row, array $ids) {
     $id_values = array();
     foreach ($ids as $id) {
       $id_values[] = $row->getDestinationProperty($id);
     }
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
index ae3030a..b817ddb 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
@@ -80,16 +80,16 @@ public function import(Row $row, array $old_destination_id_values = array()) {
   /**
    * Save the entity.
    *
    * @param \Drupal\Core\Entity\ContentEntityInterface $entity
    *   The content entity.
    * @param array $old_destination_id_values
-   *   An array of destination id values.
+   *   (optional) An array of destination ID values. Defaults to an empty array.
    *
    * @return array
-   *   An array containing the entity id.
+   *   An array containing the entity ID.
    */
   protected function save(ContentEntityInterface $entity, array $old_destination_id_values = array()) {
     $entity->save();
     return array($entity->id());
   }
 
diff --git a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
index 1e47d1a..9aa5b28 100644
--- a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
+++ b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
@@ -296,13 +296,13 @@ protected function ensureTables() {
         $pks[] = $mapkey;
       }
 
       $fields = $source_id_schema;
 
       // Add destination identifiers to map table.
-      // TODO: How do we discover the destination schema?
+      // @todo How do we discover the destination schema?
       $count = 1;
       foreach ($this->migration->getDestinationPlugin()->getIds() as $id_definition) {
         // Allow dest identifier fields to be NULL (for IGNORED/FAILED
         // cases).
         $mapkey = 'destid' . $count++;
         $fields[$mapkey] = $this->getFieldSchema($id_definition);
@@ -401,18 +401,19 @@ protected function ensureTables() {
         ));
       }
     }
   }
 
   /**
-   * Create schema from an id definition.
+   * Create schema from an ID definition.
    *
    * @param array $id_definition
    *   A field schema definition. Can be SQL schema or a type data
    *   based schema. In the latter case, the value of type needs to be
    *   $typed_data_type.$column
+   *
    * @return array
    */
   protected function getFieldSchema(array $id_definition) {
     $type_parts = explode('.', $id_definition['type']);
     if (count($type_parts) == 1) {
       $type_parts[] = 'value';
@@ -528,13 +529,13 @@ public function saveIdMapping(Row $row, array $destination_id_values, $source_ro
     );
     $count = 0;
     foreach ($destination_id_values as $dest_id) {
       $fields['destid' . ++$count] = $dest_id;
     }
     if ($count && $count != count($this->destinationIdFields())) {
-      $this->message->display(t('Could not save to map table due to missing destination id values'), 'error');
+      $this->message->display(t('Could not save to map table due to missing destination ID values'), 'error');
       return;
     }
     if ($this->migration->get('trackLastImported')) {
       $fields['last_imported'] = time();
     }
     if ($keys) {
diff --git a/core/modules/migrate/src/Plugin/migrate/process/Migration.php b/core/modules/migrate/src/Plugin/migrate/process/Migration.php
index a60e773..233ad1e 100644
--- a/core/modules/migrate/src/Plugin/migrate/process/Migration.php
+++ b/core/modules/migrate/src/Plugin/migrate/process/Migration.php
@@ -112,13 +112,13 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
         $migration = reset($migrations);
       }
       $destination_plugin = $migration->getDestinationPlugin(TRUE);
       // Only keep the process necessary to produce the destination ID.
       $process = $migration->get('process');
 
-      // We already have the source id values but need to key them for the Row
+      // We already have the source ID values but need to key them for the Row
       // constructor.
       $source_ids = $migration->getSourcePlugin()->getIds();
       $values = array();
       foreach (array_keys($source_ids) as $index => $source_id) {
         $values[$source_id] = $source_id_values[$migration->id()][$index];
       }
diff --git a/core/modules/migrate/src/Tests/MigrateMessageTest.php b/core/modules/migrate/src/Tests/MigrateMessageTest.php
index 729ca70..7345c53 100644
--- a/core/modules/migrate/src/Tests/MigrateMessageTest.php
+++ b/core/modules/migrate/src/Tests/MigrateMessageTest.php
@@ -48,13 +48,13 @@ class MigrateMessageTest extends KernelTestBase implements MigrateMessageInterfa
    */
   public function setUp() {
     parent::setUp();
 
     $this->installConfig(['system']);
 
-    // A simple migration, which will generate a message to the id map because
+    // A simple migration, which will generate a message to the ID map because
     // the concat plugin throws an exception if its source is not an array.
     $config = [
       'id' => 'sample_data',
       'migration_tags' => ['Message test'],
       'source' => [
         'plugin' => 'embedded_data',
diff --git a/core/modules/migrate/src/Tests/MigrateTestBase.php b/core/modules/migrate/src/Tests/MigrateTestBase.php
index 139bc2f..d8e4bbd 100644
--- a/core/modules/migrate/src/Tests/MigrateTestBase.php
+++ b/core/modules/migrate/src/Tests/MigrateTestBase.php
@@ -120,15 +120,15 @@ private function cleanupMigrateConnection() {
   }
 
   /**
    * Prepare any dependent migrations.
    *
    * @param array $id_mappings
-   *   A list of id mappings keyed by migration ids. Each id mapping is a list
-   *   of two arrays, the first are source ids and the second are destination
-   *   ids.
+   *   A list of ID mappings keyed by migration IDs. Each ID mapping is a list
+   *   of two arrays, the first are source IDs and the second are destination
+   *   IDs.
    */
   protected function prepareMigrations(array $id_mappings) {
     foreach ($id_mappings as $migration_id => $data) {
       // Use loadMultiple() here in order to load all variants.
       foreach (Migration::loadMultiple([$migration_id]) as $migration) {
         $id_map = $migration->getIdMap();
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
index 0b61f30..bca8908 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
@@ -53,13 +53,13 @@ public function setUp() {
   }
 
   /**
    * Saves a single ID mapping row in the database.
    *
    * @param array $map
-   *  The row to save.
+   *   The row to save.
    */
   protected function saveMap(array $map) {
     $table = 'migrate_map_sql_idmap_test';
 
     $schema = $this->database->schema();
     // If the table already exists, add any columns which are in the map array,
@@ -111,12 +111,18 @@ protected function getIdMap() {
 
     return $id_map;
   }
 
   /**
    * Sets defaults for SQL ID map plugin tests.
+   *
+   * @return array
+   *   An associative array with the following keys:
+   *   - source_row_status
+   *   - rollback_action
+   *   - hash
    */
   protected function idMapDefaults() {
     $defaults = array(
       'source_row_status' => MigrateIdMapInterface::STATUS_IMPORTED,
       'rollback_action' => MigrateIdMapInterface::ROLLBACK_DELETE,
       'hash' => '',
@@ -728,13 +734,13 @@ public function testPrepareUpdate() {
    * - No errors.
    * - One error.
    * - Multiple errors.
    */
   public function testDestroy() {
     $id_map = $this->getIdMap();
-    // Initialize the id map.
+    // Initialize the ID map.
     $id_map->getDatabase();
     $map_table_name = $id_map->mapTableName();
     $message_table_name = $id_map->messageTableName();
     $row = new Row(['source_id_property' => 'source_value'], ['source_id_property' => []]);
     $id_map->saveIdMapping($row, ['destination_id_property' => 2]);
     $id_map->saveMessage(['source_id_property' => 'source_value'], 'A message');
diff --git a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
index caa6e3d..62a0698 100644
--- a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
+++ b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
@@ -20,30 +20,32 @@ class SqlBaseTest extends UnitTestCase {
   /**
    * @param bool $expected_result
    *   The expected result.
    * @param bool $id_map_is_sql
    *   TRUE if we want getIdMap() to return an instance of Sql.
    * @param bool $with_id_map
-   *   TRUE if we want the id map to have a valid map of ids.
+   *   TRUE if we want the ID map to have a valid map of IDs.
    * @param array $source_options
-   *   An array of connection options for the source connection.
+   *   (optional) An array of connection options for the source connection.
+   *   Defaults to an empty array.
    * @param array $idmap_options
-   *   An array of connection options for the id map connection.
+   *  (optional) An array of connection options for the ID map connection.
+   *  Defaults to an empty array.
    *
    * @dataProvider sqlBaseTestProvider
    */
   public function testMapJoinable($expected_result, $id_map_is_sql, $with_id_map, $source_options = [], $idmap_options = []) {
     // Setup a connection object.
     $source_connection = $this->getMockBuilder('Drupal\Core\Database\Connection')
       ->disableOriginalConstructor()
       ->getMock();
     $source_connection->expects($id_map_is_sql && $with_id_map ? $this->once() : $this->never())
       ->method('getConnectionOptions')
       ->willReturn($source_options);
 
-    // Setup the id map connection.
+    // Setup the ID map connection.
     $idmap_connection = $this->getMockBuilder('Drupal\Core\Database\Connection')
       ->disableOriginalConstructor()
       ->getMock();
     $idmap_connection->expects($id_map_is_sql && $with_id_map ? $this->once() : $this->never())
       ->method('getConnectionOptions')
       ->willReturn($idmap_options);
@@ -82,20 +84,20 @@ public function testMapJoinable($expected_result, $id_map_is_sql, $with_id_map,
    *
    * @return array
    *   An array of data per test run.
    */
   public function sqlBaseTestProvider() {
     return [
-      // Source ids are empty so mapJoinable() is false.
+      // Source IDs are empty so mapJoinable() is false.
       [FALSE, FALSE, FALSE],
       // Still false because getIdMap() is not a subclass of Sql.
       [FALSE, FALSE, TRUE],
-      // Test mapJoinable() returns false when source and id connection options
+      // Test mapJoinable() returns false when source and ID connection options
       // differ.
       [FALSE, TRUE, TRUE, ['username' => 'different_from_map', 'password' => 'different_from_map'], ['username' => 'different_from_source', 'password' => 'different_from_source']],
-      // Returns true because source and id map connection options are the same.
+      // Returns true because source and ID map connection options are the same.
       [TRUE, TRUE, TRUE, ['username' => 'same_value', 'password' => 'same_value'], ['username' => 'same_value', 'password' => 'same_value']],
     ];
   }
 
 }
 
@@ -148,13 +150,16 @@ public function mapJoinable() {
    */
   public function getIds() {
     return $this->ids;
   }
 
   /**
-   * Allows us to set the ids during a test.
+   * Allows us to set the IDs during a test.
+   *
+   * @param array $ids
+   *   An array of identifiers.
    */
   public function setIds($ids) {
     $this->ids = $ids;
   }
 
   /**
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php
index 38b96df..7667c7f 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php
@@ -51,13 +51,13 @@ public function processFieldWidget(MigrationInterface $migration) {
   }
 
   /**
    * {@inheritdoc}
    */
   public function getFieldWidgetMap() {
-    // By default use the plugin id for the widget types.
+    // By default, use the plugin ID for the widget types.
     return [
       $this->pluginId => $this->pluginId . '_default',
     ];
   }
 
   /**
