diff --git a/core/lib/Drupal/Component/Scaffold/Handler.php b/core/lib/Drupal/Component/Scaffold/Handler.php index 697d0a1403..23382b5fea 100644 --- a/core/lib/Drupal/Component/Scaffold/Handler.php +++ b/core/lib/Drupal/Component/Scaffold/Handler.php @@ -22,12 +22,12 @@ class Handler { /** - * @todo + * Composer hook called before scaffolding begins. */ const PRE_COMPOSER_SCAFFOLD_CMD = 'pre-composer-scaffold-cmd'; /** - * @todo + * Composer hook called after scaffolding completes. */ const POST_COMPOSER_SCAFFOLD_CMD = 'post-composer-scaffold-cmd'; diff --git a/core/lib/Drupal/Component/Scaffold/Operations/OperationCollection.php b/core/lib/Drupal/Component/Scaffold/Operations/OperationCollection.php index 3d22caede1..f5667c2c7e 100644 --- a/core/lib/Drupal/Component/Scaffold/Operations/OperationCollection.php +++ b/core/lib/Drupal/Component/Scaffold/Operations/OperationCollection.php @@ -60,11 +60,18 @@ protected function findProvidingPackage(array $list_of_scaffold_files, ScaffoldF } /** - * Description + * Process all of the scaffold files listed in the provided file mappings. * @param array $file_mappings - * @param Interpolator $locationReplacements - * @param ScaffoldOptions $options - * @return type + * An multidimensional array of file mappings, as returned by + * self::getFileMappingsFromPackages(). + * @param \Drupal\Component\Scaffold\Interpolator $locationReplacements + * An object with the location mappings (e.g. [web-root]). + * @param \Drupal\Component\Scaffold\ScaffoldOptions $options + * Configuration options from the top-level composer.json file. + * + * @return \Drupal\Component\Scaffold\Operations\ScaffoldResult[] + * Associative array keyed by destination path and values as the scaffold + * result for each scaffolded file. */ public function process(array $file_mappings, Interpolator $locationReplacements, ScaffoldOptions $options) { list($list_of_scaffold_files, $resolved_file_mappings) = $this->collateScaffoldFiles($file_mappings, $locationReplacements); @@ -72,7 +79,7 @@ public function process(array $file_mappings, Interpolator $locationReplacements } /** - * Copy all files, as defined by $file_mappings. + * Organizes provided file mappings by destination and package. * * @param array $file_mappings * An multidimensional array of file mappings, as returned by diff --git a/core/tests/Drupal/Tests/Component/Scaffold/Integration/OperationCollectionTest.php b/core/tests/Drupal/Tests/Component/Scaffold/Integration/OperationCollectionTest.php index 274ef39e45..e638ac7b2d 100644 --- a/core/tests/Drupal/Tests/Component/Scaffold/Integration/OperationCollectionTest.php +++ b/core/tests/Drupal/Tests/Component/Scaffold/Integration/OperationCollectionTest.php @@ -99,10 +99,9 @@ protected function assertOverridden($project, $dest, $scaffold_list, $resolved_f * @return mixed * The return value from the protected methos. */ - protected function callProtected($obj, $methodName, $args = []) - { + protected function callProtected($obj, $methodName, $args = []) { $r = new \ReflectionMethod($obj, $methodName); - $r->setAccessible(true); + $r->setAccessible(TRUE); return $r->invokeArgs($obj, $args); }