 .../migrate/src/Annotation/MigrateDestination.php  |  4 +-
 .../src/Annotation/MigrateProcessPlugin.php        |  3 +-
 .../migrate/src/Annotation/MigrateSource.php       |  2 +-
 core/modules/migrate/src/Entity/Migration.php      | 14 ++++--
 .../migrate/src/Entity/MigrationInterface.php      | 54 +++++++++++-----------
 core/modules/migrate/src/Event/MigrateEvents.php   |  3 +-
 .../migrate/src/Event/MigrateIdMapMessageEvent.php |  7 +--
 .../migrate/src/Event/MigrateMapDeleteEvent.php    |  3 +-
 .../src/Exception/RequirementsException.php        | 13 +++---
 .../src/MigrateBuildDependencyInterface.php        |  8 +++-
 core/modules/migrate/src/MigrateException.php      | 27 +++++++----
 core/modules/migrate/src/MigrateExecutable.php     | 33 +++++++------
 .../migrate/src/MigrateExecutableInterface.php     | 10 ++--
 .../migrate/src/MigrateMessageInterface.php        |  9 +++-
 .../modules/migrate/src/MigrateTemplateStorage.php | 12 +++--
 core/modules/migrate/src/Row.php                   | 14 +++---
 16 files changed, 127 insertions(+), 89 deletions(-)

diff --git a/core/modules/migrate/src/Annotation/MigrateDestination.php b/core/modules/migrate/src/Annotation/MigrateDestination.php
index 3837370..fdae657 100644
--- a/core/modules/migrate/src/Annotation/MigrateDestination.php
+++ b/core/modules/migrate/src/Annotation/MigrateDestination.php
@@ -9,16 +9,16 @@
 
 use Drupal\Component\Annotation\Plugin;
 
 /**
  * Defines a migration destination plugin annotation object.
  *
- * Plugin Namespace: Plugin\migrate\destination
+ * Plugin Namespace: Plugin\migrate\destination.
  *
  * For a working example, see
- * \Drupal\migrate\Plugin\migrate\destination\UrlAlias
+ * \Drupal\migrate\Plugin\migrate\destination\UrlAlias.
  *
  * @see \Drupal\migrate\Plugin\MigrateDestinationInterface
  * @see \Drupal\migrate\Plugin\destination\DestinationBase
  * @see \Drupal\migrate\Plugin\MigrateDestinationPluginManager
  * @see \Drupal\migrate\Annotation\MigrateSource
  * @see \Drupal\migrate\Annotation\MigrateProcessPlugin
diff --git a/core/modules/migrate/src/Annotation/MigrateProcessPlugin.php b/core/modules/migrate/src/Annotation/MigrateProcessPlugin.php
index d01eb7d..24cff31 100644
--- a/core/modules/migrate/src/Annotation/MigrateProcessPlugin.php
+++ b/core/modules/migrate/src/Annotation/MigrateProcessPlugin.php
@@ -9,13 +9,13 @@
 
 use Drupal\Component\Annotation\Plugin;
 
 /**
  * Defines a migration process plugin annotation object.
  *
- * Plugin Namespace: Plugin\migrate\process
+ * Plugin Namespace: Plugin\migrate\process.
  *
  * For a working example, see
  * \Drupal\migrate\Plugin\migrate\process\DefaultValue
  *
  * @see \Drupal\migrate\Plugin\MigratePluginManager
  * @see \Drupal\migrate\Plugin\MigrateProcessInterface
@@ -46,7 +46,8 @@ class MigrateProcessPlugin extends Plugin {
    * can skip setting this attribute and let
    * \Drupal\migrate\MigrateExecutable::processRow() handle the iteration.
    *
    * @var bool (optional)
    */
   public $handle_multiples = FALSE;
+
 }
diff --git a/core/modules/migrate/src/Annotation/MigrateSource.php b/core/modules/migrate/src/Annotation/MigrateSource.php
index 95b53e3..ca35355 100644
--- a/core/modules/migrate/src/Annotation/MigrateSource.php
+++ b/core/modules/migrate/src/Annotation/MigrateSource.php
@@ -9,13 +9,13 @@
 
 use Drupal\Component\Annotation\Plugin;
 
 /**
  * Defines a migration source plugin annotation object.
  *
- * Plugin Namespace: Plugin\migrate\source
+ * Plugin Namespace: Plugin\migrate\source.
  *
  * For a working example, check
  * \Drupal\migrate\Plugin\migrate\source\EmptySource
  * \Drupal\migrate_drupal\Plugin\migrate\source\UrlAlias
  *
  * @see \Drupal\migrate\Plugin\MigratePluginManager
diff --git a/core/modules/migrate/src/Entity/Migration.php b/core/modules/migrate/src/Entity/Migration.php
index 094713d..1b5ea45 100644
--- a/core/modules/migrate/src/Entity/Migration.php
+++ b/core/modules/migrate/src/Entity/Migration.php
@@ -147,32 +147,37 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem
    *
    * @var array
    */
   protected $highWaterProperty;
 
   /**
-   * Indicate whether the primary system of record for this migration is the
+   * Specifies the primary system of record for this migration.
+   *
+   * Indicates whether the primary system of record for this migration is the
    * source, or the destination (Drupal). In the source case, migration of
    * an existing object will completely replace the Drupal object with data from
    * the source side. In the destination case, the existing Drupal object will
    * be loaded, then changes from the source applied; also, rollback will not be
    * supported.
    *
    * @var string
    */
   protected $systemOfRecord = self::SOURCE;
 
   /**
-   * Specify value of source_row_status for current map row. Usually set by
-   * MigrateFieldHandler implementations.
+   * Specify value of source_row_status for current map row.
+   *
+   * Usually this is set by MigrateFieldHandler implementations.
    *
    * @var int
    */
   protected $sourceRowStatus = MigrateIdMapInterface::STATUS_IMPORTED;
 
   /**
+   * The highwater value for this migration.
+   *
    * @var \Drupal\Core\KeyValueStore\KeyValueStoreInterface
    */
   protected $highWaterStorage;
 
   /**
    * Track time of last import if TRUE.
@@ -516,13 +521,13 @@ public function setProcessOfProperty($property, $process_of_property) {
 
   /**
    * {@inheritdoc}
    */
   public function mergeProcessOfProperty($property, array $process_of_property) {
     // If we already have a process value then merge the incoming process array
-    //otherwise simply set it.
+    // otherwise simply set it.
     $current_process = $this->getProcess();
     if (isset($current_process[$property])) {
       $this->process = NestedArray::mergeDeepArray([$current_process, $this->getProcessNormalized([$property => $process_of_property])], TRUE);
     }
     else {
       $this->setProcessOfProperty($property, $process_of_property);
@@ -592,7 +597,8 @@ public function calculateDependencies() {
     foreach ($dependencies as $dependency) {
       $this->addDependency('config', $this->getEntityType()->getConfigPrefix() . '.' . $dependency);
     }
 
     return $this;
   }
+
 }
diff --git a/core/modules/migrate/src/Entity/MigrationInterface.php b/core/modules/migrate/src/Entity/MigrationInterface.php
index a07c0ea..938a6ef 100644
--- a/core/modules/migrate/src/Entity/MigrationInterface.php
+++ b/core/modules/migrate/src/Entity/MigrationInterface.php
@@ -107,26 +107,27 @@
    */
   public function getSourcePlugin();
 
   /**
    * Returns the process plugins.
    *
-   * @param array $process
-   *   A process configuration array.
+   * @param array|null $process
+   *   (optional) A process configuration array. Defaults to NULL.
    *
    * @return \Drupal\migrate\Plugin\MigrateProcessInterface[][]
    *   An associative array. The keys are the destination property names. Values
    *   are process pipelines. Each pipeline contains an array of plugins.
    */
   public function getProcessPlugins(array $process = NULL);
 
   /**
    * Returns the initialized destination plugin.
    *
    * @param bool $stub_being_requested
-   *  TRUE to indicate that this destination will be asked to construct a stub.
+   *   (optional) TRUE to indicate that this destination will be asked to
+   *   construct a stub. Defaults to FALSE.
    *
    * @return \Drupal\migrate\Plugin\MigrateDestinationInterface
    *   The destination plugin.
    */
   public function getDestinationPlugin($stub_being_requested = FALSE);
 
@@ -136,88 +137,88 @@ public function getDestinationPlugin($stub_being_requested = FALSE);
    * @return \Drupal\migrate\Plugin\MigrateIdMapInterface
    *   The ID map.
    */
   public function getIdMap();
 
   /**
-   * The current value of the high water mark.
+   * Returns the current value of the high water mark.
    *
-   * The high water mark defines a timestamp stating the time the import was last
-   * run. If the mark is set, only content with a higher timestamp will be
+   * The high water mark defines a timestamp stating the time the import was
+   * last run. If the mark is set, only content with a higher timestamp will be
    * imported.
    *
    * @return int
    *   A Unix timestamp representing the high water mark.
    */
   public function getHighWater();
 
   /**
-   * Save the new high water mark.
+   * Saves the new high water mark.
    *
    * @param int $high_water
    *   The high water timestamp.
    */
   public function saveHighWater($high_water);
 
   /**
-   * Check if all source rows from this migration have been processed.
+   * Checks if all source rows from this migration have been processed.
    *
    * @return bool
    *   TRUE if this migration is complete otherwise FALSE.
    */
   public function allRowsProcessed();
 
   /**
-   * Set the current migration status.
+   * Sets the current migration status.
    *
-   * @param int $result
+   * @param int $status
    *   One of the STATUS_* constants.
    */
   public function setStatus($status);
 
   /**
-   * Get the current migration status.
+   * Gets the current migration status.
    *
    * @return int
    *   The current migration status. Defaults to STATUS_IDLE.
    */
   public function getStatus();
 
   /**
-   * Retrieve a label for the current status.
+   * Retrieves a label for the current status.
    *
    * @return string
    *   User-friendly string corresponding to a STATUS_ constant.
    */
   public function getStatusLabel();
 
   /**
-   * Get the result to return upon interruption.
+   * Gets the result to return upon interruption.
    *
    * @return int
    *   The current interruption result. Defaults to RESULT_INCOMPLETE.
    */
   public function getInterruptionResult();
 
   /**
    * Clears the result to return upon interruption.
    */
   public function clearInterruptionResult();
 
   /**
-   * Signal that the migration should be interrupted with the specified result
-   * code.
+   * Signals that the migration should be interrupted.
+   *
+   * The migration will be interrupted with the specified result code.
    *
    * @param int $result
    *   One of the MigrationInterface::RESULT_* constants.
    */
   public function interruptMigration($result);
 
   /**
-   * Get the normalized process pipeline configuration describing the process
-   * plugins.
+   * Gets process pipeline configuration describing the process plugins.
    *
    * The process configuration is always normalized. All shorthand processing
    * will be expanded into their full representations.
    *
    * @see https://www.drupal.org/node/2129651#get-shorthand
    *
@@ -234,13 +235,13 @@ public function getProcess();
    *
    * @return $this
    */
   public function setProcess(array $process);
 
   /**
-   * Set the process pipeline configuration for an individual destination field.
+   * Sets process pipeline configuration for an individual destination field.
    *
    * This method allows you to set the process pipeline configuration for a
    * single property within the full process pipeline configuration.
    *
    * @param string $property
    *   The property of which to set the process pipeline configuration.
@@ -250,38 +251,37 @@ public function setProcess(array $process);
    * @return $this
    *   The migration entity.
    */
   public function setProcessOfProperty($property, $process_of_property);
 
   /**
-   * Merge the process pipeline configuration for a single property.
+   * Merges the process pipeline configuration for a single property.
    *
    * @param string $property
    *   The property of which to merge the passed in process pipeline
-   * configuration.
+   *   configuration.
    * @param array $process_of_property
    *   The process pipeline configuration to be merged with the existing process
-   * pipeline configuration.
+   *   pipeline configuration.
    *
    * @return $this
-   *   The migration entity.
    *
-   * @see Drupal\migrate_drupal\Plugin\migrate\load\LoadEntity::processLinkField().
+   * @see Drupal\migrate_drupal\Plugin\migrate\load\LoadEntity::processLinkField()
    */
   public function mergeProcessOfProperty($property, array $process_of_property);
 
   /**
-   * Get the current system of record of the migration.
+   * Gets the current system of record of the migration.
    *
    * @return string
    *   The current system of record of the migration.
    */
   public function getSystemOfRecord();
 
   /**
-   * Set the system of record for the migration.
+   * Sets the system of record for the migration.
    *
    * @param string $system_of_record
    *   The system of record of the migration.
    *
    * @return $this
    */
@@ -293,23 +293,23 @@ public function setSystemOfRecord($system_of_record);
    * @return bool
    *   TRUE if the migration is tracking last import time.
    */
   public function isTrackLastImported();
 
   /**
-   * Set if the migration should track time of last import.
+   * Sets if the migration should track time of last import.
    *
    * @param bool $track_last_imported
    *   Boolean value to indicate if the migration should track last import time.
    *
    * @return $this
    */
   public function setTrackLastImported($track_last_imported);
 
   /**
-   * Get the dependencies for this migration.
+   * Gets the dependencies for this migration.
    *
    * @return array
    *   The dependencies for this migrations.
    */
   public function getMigrationDependencies();
 
diff --git a/core/modules/migrate/src/Event/MigrateEvents.php b/core/modules/migrate/src/Event/MigrateEvents.php
index d350245..134dc35 100644
--- a/core/modules/migrate/src/Event/MigrateEvents.php
+++ b/core/modules/migrate/src/Event/MigrateEvents.php
@@ -38,13 +38,14 @@
 
   /**
    * Name of the event fired when removing an entry from a migration's map.
    *
    * This event allows modules to perform an action whenever a row is deleted
    * from a migration's map table (implying it has been rolled back). The event
-   * listener method receives a \Drupal\migrate\Event\MigrateMapDeleteEvent instance.
+   * listener method receives a \Drupal\migrate\Event\MigrateMapDeleteEvent
+   * instance.
    *
    * @Event
    *
    * @see \Drupal\migrate\Event\MigrateMapDeleteEvent
    *
    * @var string
diff --git a/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php b/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php
index e6fe02e..0f54e91 100644
--- a/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php
+++ b/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php
@@ -48,13 +48,13 @@ class MigrateIdMapMessageEvent extends Event {
    *
    * @param \Drupal\migrate\Entity\MigrationInterface $migration
    *   Migration entity.
    * @param array $source_id_values
    *   Values represent the source ID.
    * @param string $message
-   *   The message
+   *   The message to be logged.
    * @param int $level
    *   Severity level (one of the MigrationInterface::MESSAGE_* constants).
    */
   public function __construct(MigrationInterface $migration, array $source_id_values, $message, $level) {
     $this->migration = $migration;
     $this->sourceIdValues = $source_id_values;
@@ -90,14 +90,15 @@ public function getSourceIdValues() {
    */
   public function getMessage() {
     return $this->message;
   }
 
   /**
-   * Gets the severity level of the message (one of the
-   * MigrationInterface::MESSAGE_* constants).
+   * Gets the severity level of the message.
+   *
+   * This will be one of the MigrationInterface::MESSAGE_* constants.
    *
    * @return int
    *   The message level.
    */
   public function getLevel() {
     return $this->level;
diff --git a/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php b/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php
index 2ca3b25..ac96ed8 100644
--- a/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php
+++ b/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php
@@ -32,13 +32,14 @@ class MigrateMapDeleteEvent extends Event {
   /**
    * Constructs a migration map delete event object.
    *
    * @param \Drupal\migrate\Plugin\MigrateIdMapInterface $map
    *   Map plugin.
    * @param array $source_id
-   *   Array of source ID fields representing the object being deleted from the map.
+   *   Array of source ID fields representing the object being deleted from the
+   *   map.
    */
   public function __construct(MigrateIdMapInterface $map, array $source_id) {
     $this->map = $map;
     $this->sourceId = $source_id;
   }
 
diff --git a/core/modules/migrate/src/Exception/RequirementsException.php b/core/modules/migrate/src/Exception/RequirementsException.php
index 5843de2..327fcb6 100644
--- a/core/modules/migrate/src/Exception/RequirementsException.php
+++ b/core/modules/migrate/src/Exception/RequirementsException.php
@@ -7,13 +7,13 @@
 
 namespace Drupal\migrate\Exception;
 
 use Exception;
 
 /**
- * Defines an
+ * Defines a requirements exception.
  *
  * @see \Drupal\migrate\Plugin\RequirementsInterface
  */
 class RequirementsException extends \RuntimeException {
 
   /**
@@ -24,38 +24,39 @@ class RequirementsException extends \RuntimeException {
   protected $requirements;
 
   /**
    * Constructs a new RequirementsException instance.
    *
    * @param string $message
-   *   (optional) The Exception message to throw.
+   *   (optional) The Exception message to throw. Defaults to an empty string.
    * @param array $requirements
-   *   (optional) The missing requirements.
+   *   (optional) The missing requirements. Defaults to an empty array.
    * @param int $code
-   *   (optional) The Exception code.
+   *   (optional) The Exception code. Defaults to zero.
    * @param \Exception $previous
    *   (optional) The previous exception used for the exception chaining.
+   *   Defaults to NULL.
    */
   public function __construct($message = "", array $requirements = [], $code = 0, Exception $previous = NULL) {
     parent::__construct($message, $code, $previous);
 
     $this->requirements = $requirements;
   }
 
   /**
-   * Get an array of requirements.
+   * Gets an array of requirements.
    *
    * @return array
    *   The requirements.
    */
   public function getRequirements() {
     return $this->requirements;
   }
 
   /**
-   * Get the requirements as a string.
+   * Gets the requirements as a string.
    *
    * @return string
    *   A formatted requirements string.
    */
   public function getRequirementsString() {
     $output = '';
diff --git a/core/modules/migrate/src/MigrateBuildDependencyInterface.php b/core/modules/migrate/src/MigrateBuildDependencyInterface.php
index dbf8694..66c86f7 100644
--- a/core/modules/migrate/src/MigrateBuildDependencyInterface.php
+++ b/core/modules/migrate/src/MigrateBuildDependencyInterface.php
@@ -1,25 +1,29 @@
 <?php
+
 /**
  * @file
  * Contains \Drupal\migrate\MigrateBuildDependencyInterface.
  */
 
 namespace Drupal\migrate;
 
-
+/**
+ * Defines the interface for building a migration dependency tree.
+ */
 interface MigrateBuildDependencyInterface {
 
   /**
-   * Builds a dependency tree for the migrations and set their order.
+   * Builds a dependency tree for the migrations and sets their order.
    *
    * @param \Drupal\migrate\Entity\MigrationInterface[] $migrations
    *   Array of loaded migrations with their declared dependencies.
    * @param array $dynamic_ids
    *   Keys are dynamic ids (for example node:*) values are a list of loaded
    *   migration ids (for example node:page, node:article).
    *
    * @return array
    *   An array of migrations.
    */
   public function buildDependencyMigration(array $migrations, array $dynamic_ids);
+
 }
diff --git a/core/modules/migrate/src/MigrateException.php b/core/modules/migrate/src/MigrateException.php
index 48334bf..b762446 100644
--- a/core/modules/migrate/src/MigrateException.php
+++ b/core/modules/migrate/src/MigrateException.php
@@ -33,45 +33,52 @@ class MigrateException extends \Exception {
    */
   protected $status;
 
   /**
    * Constructs a MigrateException object.
    *
-   * @param string $message
-   *   The message for the exception.
+   * @param string|null $message
+   *   (optional) The message for the exception. Defaults to NULL.
    * @param int $code
-   *   The Exception code.
-   * @param \Exception $previous
-   *   The previous exception used for the exception chaining.
+   *   (optional) The Exception code. Defaults to zero.
+   * @param \Exception|null $previous
+   *   (optional) The previous exception used for the exception chaining.
+   *   Defaults to NULL.
    * @param int $level
-   *   The level of the error, a Migration::MESSAGE_* constant.
+   *   (optional) The level of the error, a Migration::MESSAGE_* constant.
+   *   Defaults to MigrationInterface::MESSAGE_ERROR.
    * @param int $status
-   *   The status of the item for the map table, a MigrateMap::STATUS_*
-   *   constant.
+   *   (optional) The status of the item for the map table, a
+   *   MigrateMap::STATUS_* constant. Defaults to
+   *   MigrateIdMapInterface::STATUS_FAILED.
    */
   public function __construct($message = NULL, $code = 0, \Exception $previous = NULL, $level = MigrationInterface::MESSAGE_ERROR, $status = MigrateIdMapInterface::STATUS_FAILED) {
     $this->level = $level;
     $this->status = $status;
     parent::__construct($message);
   }
 
   /**
    * Gets the level.
    *
    * @return int
-   *   An integer status code. @see Migration::MESSAGE_*
+   *   An integer status code.
+   *
+   * @see Migration::MESSAGE_*
    */
   public function getLevel() {
     return $this->level;
   }
 
   /**
    * Gets the status of the current item.
    *
    * @return int
-   *   An integer status code. @see MigrateMap::STATUS_*
+   *   An integer status code.
+   *
+   * @see MigrateMap::STATUS_*
    */
   public function getStatus() {
     return $this->status;
   }
 
 }
diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php
index a370623..6ffbcc8 100644
--- a/core/modules/migrate/src/MigrateExecutable.php
+++ b/core/modules/migrate/src/MigrateExecutable.php
@@ -103,23 +103,23 @@ class MigrateExecutable implements MigrateExecutableInterface {
    * Constructs a MigrateExecutable and verifies and sets the memory limit.
    *
    * @param \Drupal\migrate\Entity\MigrationInterface $migration
    *   The migration to run.
    * @param \Drupal\migrate\MigrateMessageInterface $message
    *   The message to record.
-   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
-   *   The event dispatcher.
+   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface|null $event_dispatcher
+   *   The event dispatcher. Defaults to NULL.
    *
    * @throws \Drupal\migrate\MigrateException
    */
   public function __construct(MigrationInterface $migration, MigrateMessageInterface $message, EventDispatcherInterface $event_dispatcher = NULL) {
     $this->migration = $migration;
     $this->message = $message;
     $this->migration->getIdMap()->setMessage($message);
     $this->eventDispatcher = $event_dispatcher;
-    // Record the memory limit in bytes
+    // Record the memory limit in bytes.
     $limit = trim(ini_get('memory_limit'));
     if ($limit == '-1') {
       $this->memoryLimit = PHP_INT_MAX;
     }
     else {
       if (!is_numeric($limit)) {
@@ -129,12 +129,13 @@ public function __construct(MigrationInterface $migration, MigrateMessageInterfa
             $limit *= 1024;
           case 'm':
             $limit *= 1024;
           case 'k':
             $limit *= 1024;
             break;
+
           default:
             $limit = PHP_INT_MAX;
             $this->message->display($this->t('Invalid PHP memory_limit @limit, setting to unlimited.',
               array('@limit' => $limit)));
         }
       }
@@ -158,12 +159,13 @@ protected function getSource() {
   }
 
   /**
    * Gets the event dispatcher.
    *
    * @return \Symfony\Component\EventDispatcher\EventDispatcherInterface
+   *   The event dispatcher service.
    */
   protected function getEventDispatcher() {
     if (!$this->eventDispatcher) {
       $this->eventDispatcher = \Drupal::service('event_dispatcher');
     }
     return $this->eventDispatcher;
@@ -263,13 +265,13 @@ public function import() {
       }
       if ($high_water_property = $this->migration->get('highWaterProperty')) {
         $this->migration->saveHighWater($row->getSourceProperty($high_water_property['name']));
       }
 
       // Reset row properties.
-      unset($sourceValues, $destinationValues);
+      unset($this->sourceValues, $this->destinationValues);
       $this->sourceRowStatus = MigrateIdMapInterface::STATUS_IMPORTED;
 
       // Check for memory exhaustion.
       if (($return = $this->checkStatus()) != MigrationInterface::RESULT_COMPLETED) {
         break;
       }
@@ -308,14 +310,14 @@ public function rollback() {
       return MigrationInterface::RESULT_FAILED;
     }
 
     // Announce that rollback is about to happen.
     $this->getEventDispatcher()->dispatch(MigrateEvents::PRE_ROLLBACK, new MigrateRollbackEvent($this->migration));
 
-    // Optimistically assume things are going to work out; if not, $return will be
-    // updated to some other status.
+    // Optimistically assume things are going to work out; if not, $return will
+    // be updated to some other status.
     $return = MigrationInterface::RESULT_COMPLETED;
 
     $this->migration->setStatus(MigrationInterface::STATUS_ROLLING_BACK);
     $id_map = $this->migration->getIdMap();
     $destination = $this->migration->getDestinationPlugin();
 
@@ -433,13 +435,14 @@ public function saveMessage($message, $level = MigrationInterface::MESSAGE_ERROR
    * Pulls in additional information on the location triggering the exception.
    *
    * @param \Exception $exception
    *   Object representing the exception.
    * @param bool $save
    *   (optional) Whether to save the message in the migration's mapping table.
-   *   Set to FALSE in contexts where this doesn't make sense.
+   *   Set to FALSE in contexts where this does not make sense. Defaults to
+   *   TRUE.
    */
   protected function handleException(\Exception $exception, $save = TRUE) {
     $result = Error::decodeException($exception);
     $message = $result['@message'] . ' (' . $result['%file'] . ':' . $result['%line'] . ')';
     if ($save) {
       $this->saveMessage($message);
@@ -455,13 +458,13 @@ protected function checkStatus() {
       return MigrationInterface::RESULT_INCOMPLETE;
     }
     return MigrationInterface::RESULT_COMPLETED;
   }
 
   /**
-   * Tests whether we've exceeded the desired memory threshold.
+   * Tests whether we have exceeded the desired memory threshold.
    *
    * If so, output a message.
    *
    * @return bool
    *   TRUE if the threshold is exceeded, otherwise FALSE.
    */
@@ -471,33 +474,33 @@ protected function memoryExceeded() {
     if (!$threshold = $this->memoryThreshold) {
       return FALSE;
     }
     if ($pct_memory > $threshold) {
       $this->message->display(
         $this->t('Memory usage is @usage (@pct% of limit @limit), reclaiming memory.',
-          array('@pct' => round($pct_memory*100),
+          array('@pct' => round($pct_memory * 100),
                 '@usage' => $this->formatSize($usage),
                 '@limit' => $this->formatSize($this->memoryLimit))),
         'warning');
       $usage = $this->attemptMemoryReclaim();
       $pct_memory = $usage / $this->memoryLimit;
-      // Use a lower threshold - we don't want to be in a situation where we keep
-      // coming back here and trimming a tiny amount
+      // Use a lower threshold - we do not want to be in a situation where we
+      // keep coming back here and trimming a tiny amount.
       if ($pct_memory > (0.90 * $threshold)) {
         $this->message->display(
           $this->t('Memory usage is now @usage (@pct% of limit @limit), not enough reclaimed, starting new batch',
-            array('@pct' => round($pct_memory*100),
+            array('@pct' => round($pct_memory * 100),
                   '@usage' => $this->formatSize($usage),
                   '@limit' => $this->formatSize($this->memoryLimit))),
           'warning');
         return TRUE;
       }
       else {
         $this->message->display(
           $this->t('Memory usage is now @usage (@pct% of limit @limit), reclaimed enough, continuing',
-            array('@pct' => round($pct_memory*100),
+            array('@pct' => round($pct_memory * 100),
                   '@usage' => $this->formatSize($usage),
                   '@limit' => $this->formatSize($this->memoryLimit))),
           'warning');
         return FALSE;
       }
     }
@@ -525,18 +528,18 @@ protected function getMemoryUsage() {
   protected function attemptMemoryReclaim() {
     // First, try resetting Drupal's static storage - this frequently releases
     // plenty of memory to continue.
     drupal_static_reset();
 
     // Entity storage can blow up with caches so clear them out.
-    $manager =  \Drupal::entityManager();
+    $manager = \Drupal::entityManager();
     foreach ($manager->getDefinitions() as $id => $definition) {
       $manager->getStorage($id)->resetCache();
     }
 
-    // @TODO: explore resetting the container.
+    // @todo Explore resetting the container.
 
     return memory_get_usage();
   }
 
   /**
    * Generates a string representation for the given byte count.
diff --git a/core/modules/migrate/src/MigrateExecutableInterface.php b/core/modules/migrate/src/MigrateExecutableInterface.php
index 71fa017..771aca6 100644
--- a/core/modules/migrate/src/MigrateExecutableInterface.php
+++ b/core/modules/migrate/src/MigrateExecutableInterface.php
@@ -6,12 +6,15 @@
  */
 
 namespace Drupal\migrate;
 
 use Drupal\migrate\Entity\MigrationInterface;
 
+/**
+ * Defines an interface for a migration executable class.
+ */
 interface MigrateExecutableInterface {
 
   /**
    * Performs an import operation - migrate items from source to destination.
    */
   public function import();
@@ -25,30 +28,31 @@ public function rollback();
    * Processes a row.
    *
    * @param \Drupal\migrate\Row $row
    *   The $row to be processed.
    * @param array $process
    *   (optional) A process pipeline configuration. If not set, the top level
-   *   process configuration in the migration entity is used.
+   *   process configuration in the migration entity is used. Defaults to NULL.
    * @param mixed $value
    *   (optional) Initial value of the pipeline for the first destination.
    *   Usually setting this is not necessary as $process typically starts with
    *   a 'get'. This is useful only when the $process contains a single
    *   destination and needs to access a value outside of the source. See
    *   \Drupal\migrate\Plugin\migrate\process\Iterator::transformKey for an
-   *   example.
+   *   example. Defaults to NULL.
    *
    * @throws \Drupal\migrate\MigrateException
    */
   public function processRow(Row $row, array $process = NULL, $value = NULL);
 
   /**
    * Passes messages through to the map class.
    *
    * @param string $message
    *   The message to record.
    * @param int $level
-   *   (optional) Message severity (defaults to MESSAGE_ERROR).
+   *   (optional) Message severity. Defaults to
+   *   MigrationInterface::MESSAGE_ERROR.
    */
   public function saveMessage($message, $level = MigrationInterface::MESSAGE_ERROR);
 
 }
diff --git a/core/modules/migrate/src/MigrateMessageInterface.php b/core/modules/migrate/src/MigrateMessageInterface.php
index 2a35c8d..4069547 100644
--- a/core/modules/migrate/src/MigrateMessageInterface.php
+++ b/core/modules/migrate/src/MigrateMessageInterface.php
@@ -1,21 +1,26 @@
 <?php
+
 /**
  * @file
  * Contains \Drupal\migrate\MigrateMessageInterface.
  */
 
 namespace Drupal\migrate;
 
-
+/**
+ * Defines the interface for a migration message class.
+ */
 interface MigrateMessageInterface {
 
   /**
    * Displays a migrate message.
    *
    * @param string $message
    *   The message to display.
    * @param string $type
-   *   The type of message, for example: status or warning.
+   *   (optional) The type of message, for example: status or warning. Defaults
+   *   to 'status'.
    */
   public function display($message, $type = 'status');
+
 }
diff --git a/core/modules/migrate/src/MigrateTemplateStorage.php b/core/modules/migrate/src/MigrateTemplateStorage.php
index d08f1aa..1327bc7 100644
--- a/core/modules/migrate/src/MigrateTemplateStorage.php
+++ b/core/modules/migrate/src/MigrateTemplateStorage.php
@@ -11,26 +11,28 @@
 use Drupal\Core\Extension\ModuleHandlerInterface;
 
 /**
  * Storage to access migration template configuration in enabled extensions.
  */
 class MigrateTemplateStorage {
+
   /**
    * Extension sub-directory containing default configuration for migrations.
    */
-
   const MIGRATION_TEMPLATE_DIRECTORY = 'migration_templates';
 
   /**
    * Template subdirectory.
    *
    * @var string
    */
   protected $directory;
 
   /**
+   * The module handler service.
+   *
    * @var \Drupal\Core\Extension\ModuleHandlerInterface
    */
   protected $moduleHandler;
 
   /**
    * {@inheritdoc}
@@ -38,15 +40,15 @@ class MigrateTemplateStorage {
   public function __construct(ModuleHandlerInterface $module_handler, $directory = self::MIGRATION_TEMPLATE_DIRECTORY) {
     $this->moduleHandler = $module_handler;
     $this->directory = $directory;
   }
 
   /**
-   * Find all migration templates with the specified tag.
+   * Finds all migration templates with the specified tag.
    *
-   * @param $tag
+   * @param string $tag
    *   The tag to match.
    *
    * @return array
    *   Any templates (parsed YAML config) that matched, keyed by the ID.
    */
   public function findTemplatesByTag($tag) {
@@ -60,19 +62,19 @@ public function findTemplatesByTag($tag) {
       }
     }
     return $matched_templates;
   }
 
   /**
-   * Retrieve a template given a specific name.
+   * Retrieves a template given a specific name.
    *
    * @param string $name
    *   A migration template name.
    *
    * @return NULL|array
-   *   A parsed migration template, or NULL if it doesn't exist.
+   *   A parsed migration template, or NULL if it does not exist.
    */
   public function getTemplateByName($name) {
     $templates = $this->getAllTemplates();
     return isset($templates[$name]) ? $templates[$name] : NULL;
   }
 
diff --git a/core/modules/migrate/src/Row.php b/core/modules/migrate/src/Row.php
index 4e788af..77714ac 100644
--- a/core/modules/migrate/src/Row.php
+++ b/core/modules/migrate/src/Row.php
@@ -52,24 +52,24 @@ class Row {
     'source_row_status' => MigrateIdMapInterface::STATUS_NEEDS_UPDATE,
   );
 
   /**
    * Whether the source has been frozen already.
    *
-   * Once frozen the source can not be changed any more.
+   * Once frozen, the source can not be changed any more.
    *
    * @var bool
    */
   protected $frozen = FALSE;
 
   /**
    * The raw destination properties.
    *
    * Unlike $destination which is set by using
-   * \Drupal\Component\Utility\NestedArray::setValue() this array contains
-   * the destination as setDestinationProperty was called.
+   * \Drupal\Component\Utility\NestedArray::setValue(), this array contains the
+   * destination as setDestinationProperty was called.
    *
    * @var array
    *   The raw destination.
    *
    * @see getRawDestination()
    */
@@ -88,13 +88,13 @@ class Row {
    * @param array $values
    *   An array of values to add as properties on the object.
    * @param array $source_ids
    *   An array containing the IDs of the source using the keys as the field
    *   names.
    * @param bool $is_stub
-   *   TRUE if the row being created is a stub.
+   *   (optional) TRUE if the row being created is a stub. Defaults to FALSE.
    *
    * @throws \InvalidArgumentException
    *   Thrown when a source ID property does not exist.
    */
   public function __construct(array $values, array $source_ids, $is_stub = FALSE) {
     $this->source = $values;
@@ -188,12 +188,13 @@ public function freezeSource() {
   }
 
   /**
    * Clones the row with an empty set of destination values.
    *
    * @return static
+   *   The clone of the row with an empty set of destination values.
    */
   public function cloneWithoutDestination() {
     return (new static($this->getSource(), $this->sourceIds, $this->isStub()))->freezeSource();
   }
 
   /**
@@ -243,13 +244,13 @@ public function getDestination() {
     return $this->destination;
   }
 
   /**
    * Returns the raw destination. Rarely necessary.
    *
-   * For example calling setDestination('foo/bar', 'baz') results in
+   * For example, calling setDestination('foo/bar', 'baz') results in:
    * @code
    * $this->destination['foo']['bar'] = 'baz';
    * $this->rawDestination['foo/bar'] = 'baz';
    * @endcode
    *
    * @return array
@@ -319,13 +320,13 @@ public function changed() {
    */
   public function needsUpdate() {
     return $this->idMap['source_row_status'] == MigrateIdMapInterface::STATUS_NEEDS_UPDATE;
   }
 
   /**
-   * Returns the hash for the source values..
+   * Returns the hash for the source values.
    *
    * @return mixed
    *   The hash of the source values.
    */
   public function getHash() {
     return $this->idMap['hash'];
@@ -337,7 +338,8 @@ public function getHash() {
    * @return bool
    *   The current stub value.
    */
   public function isStub() {
     return $this->isStub;
   }
+
 }
