From 84b2d06d6c305cd8e22deb91365b05dd7381bbed Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sun, 5 Feb 2017 20:55:38 +0000 Subject: [PATCH] Issue #2845324 by vaplas: error in docs in SqlBase::initializeIterator() --- core/modules/migrate/src/Plugin/migrate/id_map/Sql.php | 10 +++++----- .../src/Plugin/migrate/source/SourcePluginBase.php | 10 +++++----- .../migrate/src/Plugin/migrate/source/SqlBase.php | 5 +---- 3 files changed, 11 insertions(+), 14 deletions(-) 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 962e05b2362d..4a9232314750 100644 --- a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php +++ b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php @@ -818,7 +818,7 @@ public function destroy() { } /** - * Implementation of Iterator::rewind(). + * Implementation of \Iterator::rewind(). * * This is called before beginning a foreach loop. */ @@ -839,7 +839,7 @@ public function rewind() { } /** - * Implementation of Iterator::current(). + * Implementation of \Iterator::current(). * * This is called when entering a loop iteration, returning the current row. */ @@ -848,7 +848,7 @@ public function current() { } /** - * Implementation of Iterator::key(). + * Implementation of \Iterator::key(). * * This is called when entering a loop iteration, returning the key of the * current row. It must be a scalar - we will serialize to fulfill the @@ -893,7 +893,7 @@ public function currentSource() { } /** - * Implementation of Iterator::next(). + * Implementation of \Iterator::next(). * * This is called at the bottom of the loop implicitly, as well as explicitly * from rewind(). @@ -911,7 +911,7 @@ public function next() { } /** - * Implementation of Iterator::valid(). + * Implementation of \Iterator::valid(). * * This is called at the top of the loop, returning TRUE to process the loop * and FALSE to terminate it. diff --git a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php index 5ce5fd39a5b5..23d03cfd0324 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php @@ -256,7 +256,7 @@ public function current() { /** * Gets the iterator key. * - * Implementation of Iterator::key - called when entering a loop iteration, + * Implementation of \Iterator::key() - called when entering a loop iteration, * returning the key of the current row. It must be a scalar - we will * serialize to fulfill the requirement, but using getCurrentIds() is * preferable. @@ -268,7 +268,7 @@ public function key() { /** * Checks whether the iterator is currently valid. * - * Implementation of Iterator::valid() - called at the top of the loop, + * Implementation of \Iterator::valid() - called at the top of the loop, * returning TRUE to process the loop and FALSE to terminate it. */ public function valid() { @@ -278,9 +278,9 @@ public function valid() { /** * Rewinds the iterator. * - * Implementation of Iterator::rewind() - subclasses of MigrateSource should - * implement performRewind() to do any class-specific setup for iterating - * source records. + * Implementation of \Iterator::rewind() - subclasses of SourcePluginBase + * should implement initializeIterator() to do any class-specific setup for + * iterating source records. */ public function rewind() { $this->getIterator()->rewind(); diff --git a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php index 097a7abd129c..b78df3b2dca1 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -201,10 +201,7 @@ protected function prepareQuery() { } /** - * Implementation of MigrateSource::performRewind(). - * - * We could simply execute the query and be functionally correct, but - * we will take advantage of the PDO-based API to optimize the query up-front. + * {@inheritdoc} */ protected function initializeIterator() { // Initialize the batch size. -- GitLab