Commit 20e4edaa authored by xjm's avatar xjm

Issue #2471571 by bojanz, Dom.: Standardize getter docblocks in Drupal\Component

parent 081f58e3
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
interface AnnotationInterface { interface AnnotationInterface {
/** /**
* Returns the value of an annotation. * Gets the value of an annotation.
*/ */
public function get(); public function get();
/** /**
* Returns the name of the provider of the annotated class. * Gets the name of the provider of the annotated class.
* *
* @return string * @return string
*/ */
...@@ -32,14 +32,14 @@ public function getProvider(); ...@@ -32,14 +32,14 @@ public function getProvider();
public function setProvider($provider); public function setProvider($provider);
/** /**
* Returns the unique ID for this annotated class. * Gets the unique ID for this annotated class.
* *
* @return string * @return string
*/ */
public function getId(); public function getId();
/** /**
* Returns the class of the annotated class. * Gets the class of the annotated class.
* *
* @return string * @return string
*/ */
......
...@@ -62,7 +62,7 @@ function __construct($plugin_namespaces = array(), $plugin_definition_annotation ...@@ -62,7 +62,7 @@ function __construct($plugin_namespaces = array(), $plugin_definition_annotation
} }
/** /**
* Returns the used doctrine annotation reader. * Gets the used doctrine annotation reader.
* *
* @return \Doctrine\Common\Annotations\Reader * @return \Doctrine\Common\Annotations\Reader
* The annotation reader. * The annotation reader.
...@@ -140,7 +140,7 @@ protected function prepareAnnotationDefinition(AnnotationInterface $annotation, ...@@ -140,7 +140,7 @@ protected function prepareAnnotationDefinition(AnnotationInterface $annotation,
} }
/** /**
* Returns an array of PSR-0 namespaces to search for plugin classes. * Gets an array of PSR-0 namespaces to search for plugin classes.
* *
* @return string[] * @return string[]
*/ */
......
...@@ -414,7 +414,7 @@ public function hasErrors() { ...@@ -414,7 +414,7 @@ public function hasErrors() {
} }
/** /**
* Retrieves error messages. * Gets error messages.
* *
* Public function to return the error messages. * Public function to return the error messages.
*/ */
......
...@@ -88,7 +88,7 @@ public function lcs() { ...@@ -88,7 +88,7 @@ public function lcs() {
} }
/** /**
* Get the original set of lines. * Gets the original set of lines.
* *
* This reconstructs the $from_lines parameter passed to the * This reconstructs the $from_lines parameter passed to the
* constructor. * constructor.
...@@ -107,7 +107,7 @@ public function orig() { ...@@ -107,7 +107,7 @@ public function orig() {
} }
/** /**
* Get the closing set of lines. * Gets the closing set of lines.
* *
* This reconstructs the $to_lines parameter passed to the * This reconstructs the $to_lines parameter passed to the
* constructor. * constructor.
......
...@@ -84,7 +84,7 @@ public function __construct($langcode = NULL) { ...@@ -84,7 +84,7 @@ public function __construct($langcode = NULL) {
} }
/** /**
* Get the plural form. * Gets the plural form.
* *
* @return string * @return string
* Plural form component from the header, for example: * Plural form component from the header, for example:
...@@ -105,7 +105,7 @@ function setLanguageName($languageName) { ...@@ -105,7 +105,7 @@ function setLanguageName($languageName) {
} }
/** /**
* Get the human readable language name. * Gets the human readable language name.
* *
* @return string * @return string
* The human readable language name. * The human readable language name.
...@@ -125,7 +125,7 @@ function setProjectName($projectName) { ...@@ -125,7 +125,7 @@ function setProjectName($projectName) {
} }
/** /**
* Get the project name. * Gets the project name.
* *
* @return string * @return string
* The human readable project name. * The human readable project name.
......
...@@ -60,7 +60,7 @@ class PoItem { ...@@ -60,7 +60,7 @@ class PoItem {
private $_translation; private $_translation;
/** /**
* Get the language code of the currently used language. * Gets the language code of the currently used language.
* *
* @return string with langcode * @return string with langcode
*/ */
...@@ -78,7 +78,7 @@ function setLangcode($langcode) { ...@@ -78,7 +78,7 @@ function setLangcode($langcode) {
} }
/** /**
* Get the context this translation belongs to. * Gets the context this translation belongs to.
* *
* @return string $context * @return string $context
*/ */
...@@ -96,7 +96,7 @@ function setContext($context) { ...@@ -96,7 +96,7 @@ function setContext($context) {
} }
/** /**
* Get the source string or the array of strings if the translation has * Gets the source string or the array of strings if the translation has
* plurals. * plurals.
* *
* @return string or array $translation * @return string or array $translation
...@@ -116,7 +116,7 @@ function setSource($source) { ...@@ -116,7 +116,7 @@ function setSource($source) {
} }
/** /**
* Get the translation string or the array of strings if the translation has * Gets the translation string or the array of strings if the translation has
* plurals. * plurals.
* *
* @return string or array $translation * @return string or array $translation
...@@ -154,7 +154,7 @@ function isPlural() { ...@@ -154,7 +154,7 @@ function isPlural() {
} }
/** /**
* Get the comment of this translation. * Gets the comment of this translation.
* *
* @return String $comment * @return String $comment
*/ */
......
...@@ -26,7 +26,7 @@ public function open(); ...@@ -26,7 +26,7 @@ public function open();
public function close(); public function close();
/** /**
* Get the URI of the PO stream that is being read or written. * Gets the URI of the PO stream that is being read or written.
* *
* @return * @return
* URI string for this stream. * URI string for this stream.
......
...@@ -208,7 +208,7 @@ public function setSeek($seek) { ...@@ -208,7 +208,7 @@ public function setSeek($seek) {
} }
/** /**
* Returns the pointer position of the current PO stream. * Gets the pointer position of the current PO stream.
*/ */
public function getSeek() { public function getSeek() {
return ftell($this->_fd); return ftell($this->_fd);
......
...@@ -40,7 +40,7 @@ class PoStreamWriter implements PoWriterInterface, PoStreamInterface { ...@@ -40,7 +40,7 @@ class PoStreamWriter implements PoWriterInterface, PoStreamInterface {
private $_fd; private $_fd;
/** /**
* Get the PO header of the current stream. * Gets the PO header of the current stream.
* *
* @return \Drupal\Component\Gettext\PoHeader * @return \Drupal\Component\Gettext\PoHeader
* The Gettext PO header. * The Gettext PO header.
...@@ -60,7 +60,7 @@ public function setHeader(PoHeader $header) { ...@@ -60,7 +60,7 @@ public function setHeader(PoHeader $header) {
} }
/** /**
* Get the current language code used. * Gets the current language code used.
* *
* @return string * @return string
* The language code. * The language code.
......
...@@ -119,7 +119,7 @@ public function save($name, $data) { ...@@ -119,7 +119,7 @@ public function save($name, $data) {
} }
/** /**
* Returns the full path where the file is or should be stored. * Gets the full path where the file is or should be stored.
* *
* This function creates a file path that includes a unique containing * This function creates a file path that includes a unique containing
* directory for the file and a file name that is a hash of the virtual file * directory for the file and a file name that is a hash of the virtual file
...@@ -162,7 +162,15 @@ public function delete($name) { ...@@ -162,7 +162,15 @@ public function delete($name) {
} }
/** /**
* Returns the full path of the containing directory where the file is or should be stored. * Gets the full path of the containing directory where the file is or should
* be stored.
*
* @param string $name
* The virtual file name. Can be a relative path.
*
* @return string
* The full path of the containing directory where the file is or should be
* stored.
*/ */
protected function getContainingDirectoryFullPath($name) { protected function getContainingDirectoryFullPath($name) {
// Remove the .php file extension from the directory name. // Remove the .php file extension from the directory name.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
interface ConfigurablePluginInterface extends DependentPluginInterface { interface ConfigurablePluginInterface extends DependentPluginInterface {
/** /**
* Returns this plugin's configuration. * Gets this plugin's configuration.
* *
* @return array * @return array
* An array of this plugin's configuration. * An array of this plugin's configuration.
...@@ -31,7 +31,7 @@ public function getConfiguration(); ...@@ -31,7 +31,7 @@ public function getConfiguration();
public function setConfiguration(array $configuration); public function setConfiguration(array $configuration);
/** /**
* Returns default configuration for this plugin. * Gets default configuration for this plugin.
* *
* @return array * @return array
* An associative array with the default configuration. * An associative array with the default configuration.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
interface ContextDefinitionInterface { interface ContextDefinitionInterface {
/** /**
* Returns a human readable label. * Gets a human readable label.
* *
* @return string * @return string
* The label. * The label.
...@@ -34,7 +34,7 @@ public function getLabel(); ...@@ -34,7 +34,7 @@ public function getLabel();
public function setLabel($label); public function setLabel($label);
/** /**
* Returns a human readable description. * Gets a human readable description.
* *
* @return string|null * @return string|null
* The description, or NULL if no description is available. * The description, or NULL if no description is available.
...@@ -52,7 +52,7 @@ public function getDescription(); ...@@ -52,7 +52,7 @@ public function getDescription();
public function setDescription($description); public function setDescription($description);
/** /**
* Returns the data type needed by the context. * Gets the data type needed by the context.
* *
* If the context is multiple-valued, this represents the type of each value. * If the context is multiple-valued, this represents the type of each value.
* *
...@@ -72,7 +72,7 @@ public function getDataType(); ...@@ -72,7 +72,7 @@ public function getDataType();
public function setDataType($data_type); public function setDataType($data_type);
/** /**
* Returns whether the data is multi-valued, i.e. a list of data items. * Determines whether the data is multi-valued, i.e. a list of data items.
* *
* @return bool * @return bool
* Whether the data is multi-valued; i.e. a list of data items. * Whether the data is multi-valued; i.e. a list of data items.
...@@ -110,7 +110,7 @@ public function isRequired(); ...@@ -110,7 +110,7 @@ public function isRequired();
public function setRequired($required = TRUE); public function setRequired($required = TRUE);
/** /**
* Provides the default value for this context definition. * Gets the default value for this context definition.
* *
* @return mixed * @return mixed
* The default value or NULL if no default value is set. * The default value or NULL if no default value is set.
...@@ -128,7 +128,7 @@ public function getDefaultValue(); ...@@ -128,7 +128,7 @@ public function getDefaultValue();
public function setDefaultValue($default_value); public function setDefaultValue($default_value);
/** /**
* Returns an array of validation constraints. * Gets an array of validation constraints.
* *
* @return array * @return array
* An array of validation constraint definitions, keyed by constraint name. * An array of validation constraint definitions, keyed by constraint name.
...@@ -165,7 +165,7 @@ public function setConstraints(array $constraints); ...@@ -165,7 +165,7 @@ public function setConstraints(array $constraints);
public function addConstraint($constraint_name, $options = NULL); public function addConstraint($constraint_name, $options = NULL);
/** /**
* Returns a validation constraint. * Gets a validation constraint.
* *
* @param string $constraint_name * @param string $constraint_name
* The name of the constraint, i.e. its plugin id. * The name of the constraint, i.e. its plugin id.
......
...@@ -126,7 +126,7 @@ public function setContextValue($name, $value); ...@@ -126,7 +126,7 @@ public function setContextValue($name, $value);
public function validateContexts(); public function validateContexts();
/** /**
* Returns a mapping of the expected assignment names to their context names. * Gets a mapping of the expected assignment names to their context names.
* *
* @return array * @return array
* A mapping of the expected assignment names to their context names. For * A mapping of the expected assignment names to their context names. For
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
interface DeriverInterface { interface DeriverInterface {
/** /**
* Returns the definition of a derivative plugin. * Gets the definition of a derivative plugin.
* *
* @param string $derivative_id * @param string $derivative_id
* The derivative id. The id must uniquely identify the derivative within a * The derivative id. The id must uniquely identify the derivative within a
...@@ -33,7 +33,7 @@ interface DeriverInterface { ...@@ -33,7 +33,7 @@ interface DeriverInterface {
public function getDerivativeDefinition($derivative_id, $base_plugin_definition); public function getDerivativeDefinition($derivative_id, $base_plugin_definition);
/** /**
* Returns the definition of all derivatives of a base plugin. * Gets the definition of all derivatives of a base plugin.
* *
* @param array $base_plugin_definition * @param array $base_plugin_definition
* The definition array of the base plugin. * The definition array of the base plugin.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
interface DerivativeInspectionInterface { interface DerivativeInspectionInterface {
/** /**
* Returns the base_plugin_id of the plugin instance. * Gets the base_plugin_id of the plugin instance.
* *
* @return string * @return string
* The base_plugin_id of the plugin instance. * The base_plugin_id of the plugin instance.
...@@ -21,7 +21,7 @@ interface DerivativeInspectionInterface { ...@@ -21,7 +21,7 @@ interface DerivativeInspectionInterface {
public function getBaseId(); public function getBaseId();
/** /**
* Returns the derivative_id of the plugin instance. * Gets the derivative_id of the plugin instance.
* *
* @return string|null * @return string|null
* The derivative_id of the plugin instance NULL otherwise. * The derivative_id of the plugin instance NULL otherwise.
......
...@@ -192,7 +192,7 @@ protected function getDeriver($base_plugin_id, $base_definition) { ...@@ -192,7 +192,7 @@ protected function getDeriver($base_plugin_id, $base_definition) {
} }
/** /**
* Get the deriver class name from the base plugin definition. * Gets the deriver class name from the base plugin definition.
* *
* @param array $base_definition * @param array $base_definition
* The base plugin definition to build derivatives. * The base plugin definition to build derivatives.
......
...@@ -33,7 +33,7 @@ public function __construct($plugin_id, $message = '', $code = 0, \Exception $pr ...@@ -33,7 +33,7 @@ public function __construct($plugin_id, $message = '', $code = 0, \Exception $pr
} }
/** /**
* Returns the plugin ID of the mapper that raised the exception. * Gets the plugin ID of the mapper that raised the exception.
* *
* @return string * @return string
* The plugin ID. * The plugin ID.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
interface FactoryInterface { interface FactoryInterface {
/** /**
* Returns a pre-configured instance of a plugin. * Creates a pre-configured instance of a plugin.
* *
* @param string $plugin_id * @param string $plugin_id
* The ID of the plugin being instantiated. * The ID of the plugin being instantiated.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
interface FallbackPluginManagerInterface { interface FallbackPluginManagerInterface {
/** /**
* Returns a fallback id for a missing plugin. * Gets a fallback id for a missing plugin.
* *
* @param string $plugin_id * @param string $plugin_id
* The ID of the missing requested plugin. * The ID of the missing requested plugin.
......
...@@ -37,7 +37,7 @@ abstract class LazyPluginCollection implements \IteratorAggregate, \Countable { ...@@ -37,7 +37,7 @@ abstract class LazyPluginCollection implements \IteratorAggregate, \Countable {
abstract protected function initializePlugin($instance_id); abstract protected function initializePlugin($instance_id);
/** /**
* Returns the current configuration of all plugins in this collection. * Gets the current configuration of all plugins in this collection.
* *
* @return array * @return array
* An array of up-to-date plugin configuration. * An array of up-to-date plugin configuration.
...@@ -75,7 +75,7 @@ public function has($instance_id) { ...@@ -75,7 +75,7 @@ public function has($instance_id) {
} }
/** /**
* Retrieves a plugin instance, initializing it if necessary. * Gets a plugin instance, initializing it if necessary.
* *
* @param string $instance_id * @param string $instance_id
* The ID of the plugin instance being retrieved. * The ID of the plugin instance being retrieved.
...@@ -127,7 +127,7 @@ public function addInstanceId($id, $configuration = NULL) { ...@@ -127,7 +127,7 @@ public function addInstanceId($id, $configuration = NULL) {
} }
/** /**
* Returns all instance IDs. * Gets all instance IDs.
* *
* @return array * @return array
* An array of all available instance IDs. * An array of all available instance IDs.
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
interface MapperInterface { interface MapperInterface {
/** /**
* Returns a preconfigured instance of a plugin. * Gets a preconfigured instance of a plugin.
* *
* @param array $options * @param array $options
* An array of options that can be used to determine a suitable plugin to * An array of options that can be used to determine a suitable plugin to
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
interface PluginInspectionInterface { interface PluginInspectionInterface {
/** /**
* Returns the plugin_id of the plugin instance. * Gets the plugin_id of the plugin instance.
* *
* @return string * @return string
* The plugin_id of the plugin instance. * The plugin_id of the plugin instance.
...@@ -25,7 +25,7 @@ interface PluginInspectionInterface { ...@@ -25,7 +25,7 @@ interface PluginInspectionInterface {
public function getPluginId(); public function getPluginId();
/** /**
* Returns the definition of the plugin implementation. * Gets the definition of the plugin implementation.
* *
* @return array * @return array
* The plugin definition, as returned by the discovery object used by the * The plugin definition, as returned by the discovery object used by the
......
...@@ -35,7 +35,7 @@ public static function encode($data); ...@@ -35,7 +35,7 @@ public static function encode($data);
public static function decode($raw); public static function decode($raw);
/** /**
* Returns the file extension for this serialization format. * Gets the file extension for this serialization format.
* *
* @return string * @return string
* The file extension, without leading dot. * The file extension, without leading dot.
......
...@@ -62,7 +62,7 @@ public function getArguments(callable $callable) { ...@@ -62,7 +62,7 @@ public function getArguments(callable $callable) {
} }
/** /**
* Returns the argument value for a parameter. * Gets the argument value for a parameter.
* *
* @param \ReflectionParameter $parameter * @param \ReflectionParameter $parameter
* The parameter of a callable to get the value for. * The parameter of a callable to get the value for.
...@@ -110,7 +110,7 @@ protected function getArgument(\ReflectionParameter $parameter) { ...@@ -110,7 +110,7 @@ protected function getArgument(\ReflectionParameter $parameter) {
} }
/** /**
* Returns a reflector for the access check callable. * Gets a reflector for the access check callable.
* *
* The access checker may be either a procedural function (in which case the * The access checker may be either a procedural function (in which case the
* callable is the function name) or a method (in which case the callable is * callable is the function name) or a method (in which case the callable is
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
interface ArgumentsResolverInterface { interface ArgumentsResolverInterface {
/** /**
* Returns arguments suitable for passing to the given callable. * Gets arguments suitable for passing to the given callable.
* *
* @return array * @return array
* An array of arguments to pass to the callable. * An array of arguments to pass to the callable.
......
...@@ -153,13 +153,13 @@ public static function checkAdminXss($string) { ...@@ -153,13 +153,13 @@ public static function checkAdminXss($string) {
} }
/** /**
* Retrieves all strings currently marked as safe. * Gets all strings currently marked as safe.
* *
* This is useful for the batch and form APIs, where it is important to * This is useful for the batch and form APIs, where it is important to
* preserve the safe markup state across page requests. * preserve the safe markup state across page requests.
* *
* @return array * @return array
* Returns all strings currently marked safe. * An array of strings currently marked safe.
*/ */
public static function getAll() { public static function getAll() {
return static::$safeStrings; return static::$safeStrings;
......
...@@ -100,7 +100,7 @@ class Unicode { ...@@ -100,7 +100,7 @@ class Unicode {