diff --git a/core/includes/config.inc b/core/includes/config.inc index 1562ff0..a1d221e 100644 --- a/core/includes/config.inc +++ b/core/includes/config.inc @@ -181,12 +181,13 @@ function config_sync_get_changes(StorageInterface $source_storage, StorageInterf * * For example, for the config file core/modules/system/config/system.site.yml: * @code - * name: Site-Install - * mail: admin@example.com - * slogan: 'This is an example site' + * name: Drupal + * mail: '' + * slogan: '' * page: - * 403: 'pages/403' - * 404: 'pages/404' + * 403: '' + * 404: '' + * front: user * @endcode * * The metadata in core/modules/system/meta/system.site.yml: @@ -211,6 +212,9 @@ function config_sync_get_changes(StorageInterface $source_storage, StorageInterf * 404: * .definition: * label: 'Default 404 (not found) page' + * front: + * .definition: + * label: 'Default front page' * @endcode * * Elements that don't have an explicit type will default to the type 'string' @@ -242,7 +246,7 @@ function config_sync_get_changes(StorageInterface $source_storage, StorageInterf * * For every element, meta/user.mail.%.yml is read as specified by the * 'elements name' list settings: - * @end + * @code * .definition: * label: 'Mail text' * subject: @@ -332,18 +336,18 @@ function config_sync_get_changes(StorageInterface $source_storage, StorageInterf * type: 'integer' * @endcode * - * @see Drupal\Core\TypedData\TypedDataManager::create() - * @see Drupal\Core\Config\Metadata\ElementBase - * @see Drupal\Core\Config\Metadata\ListElement + * @see \Drupal\Core\TypedData\TypedDataManager::create() + * @see \Drupal\Core\Config\Metadata\ElementBase + * @see \Drupal\Core\Config\Metadata\ListElement * * @param string $name * The name or key of the configuration object, the same as passed to * config(). * - * @return Drupal\Core\Config\Metadata\MetadataLookup + * @return \Drupal\Core\Config\Metadata\MetadataLookup * A metadata array. * - * @see Drupal\Core\Config\Metadata\ElementInterface::getMetadata() + * @see \Drupal\Core\Config\Metadata\ElementInterface::getMetadata() */ function config_metadata($name) { return drupal_container()->get('config.metadata')->offsetGet($name); @@ -355,7 +359,7 @@ function config_metadata($name) { * @param string $name * The name of the configuration object to retrieve. * - * @return Drupal\Core\Config\Metadata\TypedConfig + * @return \Drupal\Core\Config\Metadata\TypedConfig * A configuration wrapper object. */ function config_wrapper($name) { diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 5327a77..fd2d7ba 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1681,10 +1681,10 @@ function install_import_translations_remaining(&$install_state) { /** * Creates configuration translations. * - * @param $install_state + * @param array $install_state * An array of information about the current installation state. * - * @return + * @return array * The batch definition, if there are configuration objects to update. */ function install_update_configuration_translations(&$install_state) { diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index ad3476c..931c1f3 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -15,7 +15,7 @@ class InstallStorage extends FileStorage { /** - * Folder map indexed by configuration name + * Folder map indexed by configuration name. * * @var array */ @@ -160,4 +160,5 @@ public function getComponentNames($type, $list) { protected function getComponentFolder($type, $name) { return drupal_get_path($type, $name) . '/config'; } + } diff --git a/core/lib/Drupal/Core/Config/Metadata/ConfigElement.php b/core/lib/Drupal/Core/Config/Metadata/ConfigElement.php index 742cccc..b3c4479 100644 --- a/core/lib/Drupal/Core/Config/Metadata/ConfigElement.php +++ b/core/lib/Drupal/Core/Config/Metadata/ConfigElement.php @@ -19,6 +19,7 @@ * type of nested properties. */ class ConfigElement extends ElementBase implements ComplexDataInterface { + /** * Implements Drupal\Core\TypedData\ComplexDataInterface::get(). */ diff --git a/core/lib/Drupal/Core/Config/Metadata/ElementBase.php b/core/lib/Drupal/Core/Config/Metadata/ElementBase.php index d92f574..81b75cd 100644 --- a/core/lib/Drupal/Core/Config/Metadata/ElementBase.php +++ b/core/lib/Drupal/Core/Config/Metadata/ElementBase.php @@ -70,7 +70,7 @@ protected function getElement($key) { /** * Gets the built metadata array for a child element. * - * @param $key + * @param string $key * Key from the configuration data array. * * @return array diff --git a/core/lib/Drupal/Core/Config/Metadata/TypedConfig.php b/core/lib/Drupal/Core/Config/Metadata/TypedConfig.php index ef4e3cc..1964ee1 100644 --- a/core/lib/Drupal/Core/Config/Metadata/TypedConfig.php +++ b/core/lib/Drupal/Core/Config/Metadata/TypedConfig.php @@ -60,13 +60,14 @@ public function setData(array $data) { } /** - * Overrides Drupal\Core\Config::get() + * Overrides Drupal\Core\Config::get(). * * Unlike the get() method of the base configuration object, this one returns * a typed data object instead of raw configuration data. * - * @return \Drupal\Core\TypedData\TypedDataInterface - * The data that was requested. + * @return \Drupal\Core\TypedData\TypedDataInterface|null + * The data that was requested or NULL if the base was not a ListInterface + * or a ComplexDataInterface. */ public function get($key = '') { $element = $this->getBase(); diff --git a/core/lib/Drupal/Core/Config/Metadata/TypedConfigFactory.php b/core/lib/Drupal/Core/Config/Metadata/TypedConfigFactory.php index 76d97d5..aa416ad 100644 --- a/core/lib/Drupal/Core/Config/Metadata/TypedConfigFactory.php +++ b/core/lib/Drupal/Core/Config/Metadata/TypedConfigFactory.php @@ -15,6 +15,8 @@ class TypedConfigFactory { /** + * The configuration factory. + * * @var \Drupal\Core\Config\ConfigFactory */ protected $configFactory; @@ -32,7 +34,10 @@ function __construct(ConfigFactory $config_factory) { * Returns configuration wrapper object to access data as typed properties. * * @param string $name + * Name of the data. + * * @return TypedConfig + * The configuration wrapper as an object. */ function get($name) { return new TypedConfig($name, $this->configFactory->get($name)->load()->get()); diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigMetadataTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigMetadataTest.php index ceec0fc..947603a 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigMetadataTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigMetadataTest.php @@ -14,6 +14,7 @@ * Tests Metadata for configuration objects. */ class ConfigMetadataTest extends WebTestBase { + /** * Modules to enable. * diff --git a/core/modules/locale/lib/Drupal/locale/LocaleTypedConfig.php b/core/modules/locale/lib/Drupal/locale/LocaleTypedConfig.php index 8dd3119..7c11d20 100644 --- a/core/modules/locale/lib/Drupal/locale/LocaleTypedConfig.php +++ b/core/modules/locale/lib/Drupal/locale/LocaleTypedConfig.php @@ -56,7 +56,8 @@ class LocaleTypedConfig extends TypedConfig implements TranslatableInterface { * @param array $data * The configuration data. * @param \Drupal\locale\StringStorageInterface $localeStorage; - * (optional) Locale string storage object that will be used for translations. + * (optional) Locale string storage object that will be used for + * translations. */ public function __construct($name, $data, StringStorageInterface $localeStorage = NULL) { parent::__construct($name, $data); @@ -213,7 +214,7 @@ public function translateElement($element, $options) { * Unlike regular t() translations, strings will be added to the source * tables only if this is marked as default data. * - * @param $langcode + * @param string $langcode * Language code to translate to. * @param string $source * The source string. @@ -254,4 +255,5 @@ protected function translateString($langcode, $source, $context) { } return FALSE; } + } diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php index 23b0ff6..453b212 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php @@ -15,6 +15,7 @@ * Tests Metadata for configuration objects. */ class LocaleConfigTranslationTest extends WebTestBase { + /** * Modules to enable. * diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 2043e86..637f92f 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -533,6 +533,14 @@ function locale_translate_batch_import($filepath, $options, &$context) { /** * Refresh translations after importing strings. + * + * @param array $options + * An array with options that can have the following elements: + * - 'refresh_configuration': Whether or not to refresh Configuration strings + * after the import. Optional, defaults to FALSE. + * + * @param array $context + * Contains a list of strings updated and information about the progress. */ function locale_translate_batch_refresh($options, &$context) { if (!isset($context['sandbox']['refresh'])) { @@ -695,6 +703,9 @@ function locale_translate_delete_translation_files($langcode) { * @param array $components * (optional) Array of component lists indexed by type. If not present or it * is an empty array, it will update all components. + * + * @return array + * The batch definition. */ function locale_config_batch_update_components($options, $components = array()) { $langcodes = isset($options['langcode']) ? array($options['langcode']) : array_keys(locale_translatable_language_list()); @@ -714,6 +725,9 @@ function locale_config_batch_update_components($options, $components = array()) * An array with options that can have the following elements: * - 'finish_feedback': Whether or not to give feedback to the user when the * batch is finished. Optional, defaults to TRUE. + * + * @return array + * The batch definition. */ function locale_config_batch_build($names, $langcodes, $options = array()) { $options += array('finish_feedback' => TRUE); @@ -737,6 +751,10 @@ function locale_config_batch_build($names, $langcodes, $options = array()) { /** * Perform configuration translation refresh as a batch step. * + * @param array $name + * Name of configuration object to update. + * @param array $langcodes + * (optional) Array of language codes to update. Defaults to all languages. * @param $context * Contains a list of files imported. */ @@ -752,6 +770,11 @@ function locale_config_batch_refresh_name($name, $langcodes, &$context) { /** * Finished callback of system page locale import batch. + * + * @param bool $success + * Information about the success of the batch import. + * @param array $results + * Information about the results of the batch import. */ function locale_config_batch_finished($success, $results) { if ($success) { @@ -831,6 +854,7 @@ function locale_config_update_multiple($names, $langcodes = array()) { * Default configuration data. * @param array $updated * Current configuration data. + * * @return array * The elements of default configuration that haven't changed. */ @@ -855,6 +879,9 @@ function _locale_config_data_compare($default, $updated) { /** * Delete configuration for uninstalled components. + * + * @param array $components + * Array with string identifiers. */ function locale_config_delete_components($components) { $names = _locale_config_component_names($components);