diff --git a/core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php b/core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php index fa3bafb..4d515a3 100644 --- a/core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php +++ b/core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php @@ -33,14 +33,14 @@ class YamlDirectoryDiscovery implements DiscoverableInterface { protected $directories = []; /** - * The suffix the file cache key. + * The suffix for the file cache key. * * @var string */ protected $fileCacheKeySuffix; /** - * The key which contains the value to key the data by. + * The key contained in the discovered data that identifies it. * * @var string */ @@ -50,7 +50,9 @@ class YamlDirectoryDiscovery implements DiscoverableInterface { * Constructs a YamlDirectoryDiscovery object. * * @param array $directories - * An array of directories to scan, keyed by the provider. + * An array of directories to scan, keyed by the provider. The value can + * either be a string or an array of strings. The string values should be + * the path of a directory to scan. * @param string $file_cache_key_suffix * The file cache key suffix. This should be unique for each type of * discovery. @@ -144,9 +146,9 @@ protected function findFiles() { /** * Gets an iterator to loop over the files in the provided directory. * - * This method is exists so that it is easy to replace this functionality in - * a class that extends this one. For example, it could be used to make the - * scan recursive. + * This method exists so that it is easy to replace this functionality in a + * class that extends this one. For example, it could be used to make the scan + * recursive. * * @param string $directory * The directory to scan. diff --git a/core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php b/core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php index 244394e..2a5c1f6 100644 --- a/core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php +++ b/core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php @@ -10,7 +10,7 @@ use Drupal\Component\Discovery\YamlDirectoryDiscovery as ComponentYamlDirectoryDiscovery; /** - * Allows directories that contain YAML files to define plugin definitions. + * Allows multiple YAML files per directory to define plugin definitions. */ class YamlDirectoryDiscovery extends YamlDiscovery { @@ -18,7 +18,9 @@ class YamlDirectoryDiscovery extends YamlDiscovery { * Constructs a YamlDirectoryDiscovery object. * * @param array $directories - * An array of directories to scan, keyed by the provider. + * An array of directories to scan, keyed by the provider. The value can + * either be a string or an array of strings. The string values should be + * the path of a directory to scan. * @param string $file_cache_key_suffix * The file cache key suffix. This should be unique for each type of * discovery.