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 @@
interface AnnotationInterface {
/**
* Returns the value of an annotation.
* Gets the value of an annotation.
*/
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
*/
......@@ -32,14 +32,14 @@ public function getProvider();
public function setProvider($provider);
/**
* Returns the unique ID for this annotated class.
* Gets the unique ID for this annotated class.
*
* @return string
*/
public function getId();
/**
* Returns the class of the annotated class.
* Gets the class of the annotated class.
*
* @return string
*/
......
......@@ -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
* The annotation reader.
......@@ -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[]
*/
......
......@@ -414,7 +414,7 @@ public function hasErrors() {
}
/**
* Retrieves error messages.
* Gets error messages.
*
* Public function to return the error messages.
*/
......
......@@ -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
* constructor.
......@@ -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
* constructor.
......
......@@ -84,7 +84,7 @@ public function __construct($langcode = NULL) {
}
/**
* Get the plural form.
* Gets the plural form.
*
* @return string
* Plural form component from the header, for example:
......@@ -105,7 +105,7 @@ function setLanguageName($languageName) {
}
/**
* Get the human readable language name.
* Gets the human readable language name.
*
* @return string
* The human readable language name.
......@@ -125,7 +125,7 @@ function setProjectName($projectName) {
}
/**
* Get the project name.
* Gets the project name.
*
* @return string
* The human readable project name.
......
......@@ -60,7 +60,7 @@ class PoItem {
private $_translation;
/**
* Get the language code of the currently used language.
* Gets the language code of the currently used language.
*
* @return string with 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
*/
......@@ -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.
*
* @return string or array $translation
......@@ -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.
*
* @return string or array $translation
......@@ -154,7 +154,7 @@ function isPlural() {
}
/**
* Get the comment of this translation.
* Gets the comment of this translation.
*
* @return String $comment
*/
......
......@@ -26,7 +26,7 @@ public function open();
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
* URI string for this stream.
......
......@@ -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() {
return ftell($this->_fd);
......
......@@ -40,7 +40,7 @@ class PoStreamWriter implements PoWriterInterface, PoStreamInterface {
private $_fd;
/**
* Get the PO header of the current stream.
* Gets the PO header of the current stream.
*
* @return \Drupal\Component\Gettext\PoHeader
* The Gettext PO header.
......@@ -60,7 +60,7 @@ public function setHeader(PoHeader $header) {
}
/**
* Get the current language code used.
* Gets the current language code used.
*
* @return string
* The language code.
......
......@@ -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
* directory for the file and a file name that is a hash of the virtual file
......@@ -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) {
// Remove the .php file extension from the directory name.
......
......@@ -15,7 +15,7 @@
interface ConfigurablePluginInterface extends DependentPluginInterface {
/**
* Returns this plugin's configuration.
* Gets this plugin's configuration.
*
* @return array
* An array of this plugin's configuration.
......@@ -31,7 +31,7 @@ public function getConfiguration();
public function setConfiguration(array $configuration);
/**
* Returns default configuration for this plugin.
* Gets default configuration for this plugin.
*
* @return array
* An associative array with the default configuration.
......
......@@ -16,7 +16,7 @@
interface ContextDefinitionInterface {
/**
* Returns a human readable label.
* Gets a human readable label.
*
* @return string
* The label.
......@@ -34,7 +34,7 @@ public function getLabel();
public function setLabel($label);
/**
* Returns a human readable description.
* Gets a human readable description.
*
* @return string|null
* The description, or NULL if no description is available.
......@@ -52,7 +52,7 @@ public function getDescription();
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.
*
......@@ -72,7 +72,7 @@ public function getDataType();
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
* Whether the data is multi-valued; i.e. a list of data items.
......@@ -110,7 +110,7 @@ public function isRequired();
public function setRequired($required = TRUE);
/**
* Provides the default value for this context definition.
* Gets the default value for this context definition.
*
* @return mixed
* The default value or NULL if no default value is set.
......@@ -128,7 +128,7 @@ public function getDefaultValue();
public function setDefaultValue($default_value);
/**
* Returns an array of validation constraints.
* Gets an array of validation constraints.
*
* @return array
* An array of validation constraint definitions, keyed by constraint name.
......@@ -165,7 +165,7 @@ public function setConstraints(array $constraints);
public function addConstraint($constraint_name, $options = NULL);
/**
* Returns a validation constraint.
* Gets a validation constraint.
*
* @param string $constraint_name
* The name of the constraint, i.e. its plugin id.
......
......@@ -126,7 +126,7 @@ public function setContextValue($name, $value);
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
* A mapping of the expected assignment names to their context names. For
......
......@@ -15,7 +15,7 @@
interface DeriverInterface {
/**
* Returns the definition of a derivative plugin.
* Gets the definition of a derivative plugin.
*
* @param string $derivative_id
* The derivative id. The id must uniquely identify the derivative within a
......@@ -33,7 +33,7 @@ interface DeriverInterface {
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
* The definition array of the base plugin.
......
......@@ -13,7 +13,7 @@
interface DerivativeInspectionInterface {
/**
* Returns the base_plugin_id of the plugin instance.
* Gets the base_plugin_id of the plugin instance.
*
* @return string
* The base_plugin_id of the plugin instance.
......@@ -21,7 +21,7 @@ interface DerivativeInspectionInterface {
public function getBaseId();
/**
* Returns the derivative_id of the plugin instance.
* Gets the derivative_id of the plugin instance.
*
* @return string|null
* The derivative_id of the plugin instance NULL otherwise.
......
......@@ -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
* The base plugin definition to build derivatives.
......
......@@ -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
* The plugin ID.
......
......@@ -12,7 +12,7 @@
interface FactoryInterface {
/**
* Returns a pre-configured instance of a plugin.
* Creates a pre-configured instance of a plugin.
*
* @param string $plugin_id
* The ID of the plugin being instantiated.
......
......@@ -13,7 +13,7 @@
interface FallbackPluginManagerInterface {
/**
* Returns a fallback id for a missing plugin.
* Gets a fallback id for a missing plugin.
*
* @param string $plugin_id
* The ID of the missing requested plugin.
......
......@@ -37,7 +37,7 @@ abstract class LazyPluginCollection implements \IteratorAggregate, \Countable {
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
* An array of up-to-date plugin configuration.
......@@ -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
* The ID of the plugin instance being retrieved.
......@@ -127,7 +127,7 @@ public function addInstanceId($id, $configuration = NULL) {
}
/**
* Returns all instance IDs.
* Gets all instance IDs.
*
* @return array
* An array of all available instance IDs.
......
......@@ -18,7 +18,7 @@
interface MapperInterface {
/**
* Returns a preconfigured instance of a plugin.
* Gets a preconfigured instance of a plugin.
*
* @param array $options
* An array of options that can be used to determine a suitable plugin to
......
......@@ -17,7 +17,7 @@
interface PluginInspectionInterface {
/**
* Returns the plugin_id of the plugin instance.
* Gets the plugin_id of the plugin instance.
*
* @return string
* The plugin_id of the plugin instance.
......@@ -25,7 +25,7 @@ interface PluginInspectionInterface {
public function getPluginId();
/**
* Returns the definition of the plugin implementation.
* Gets the definition of the plugin implementation.
*
* @return array
* The plugin definition, as returned by the discovery object used by the
......
......@@ -35,7 +35,7 @@ public static function encode($data);
public static function decode($raw);
/**
* Returns the file extension for this serialization format.
* Gets the file extension for this serialization format.
*
* @return string
* The file extension, without leading dot.
......
......@@ -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
* The parameter of a callable to get the value for.
......@@ -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
* callable is the function name) or a method (in which case the callable is
......
......@@ -13,7 +13,7 @@
interface ArgumentsResolverInterface {
/**
* Returns arguments suitable for passing to the given callable.
* Gets arguments suitable for passing to the given callable.
*
* @return array
* An array of arguments to pass to the callable.
......
......@@ -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
* preserve the safe markup state across page requests.
*
* @return array
* Returns all strings currently marked safe.
* An array of strings currently marked safe.
*/
public static function getAll() {
return static::$safeStrings;
......
......@@ -100,7 +100,7 @@ class Unicode {
protected static $status = 0;
/**
* Get the current status of unicode/multibyte support on this environment.
* Gets the current status of unicode/multibyte support on this environment.
*
* @return int
* The status of multibyte support. It can be one of:
......
......@@ -200,7 +200,7 @@ public static function encodePath($path) {
}
/**
* Returns whether a path is external to Drupal (e.g. http://example.com).
* Determines whether a path is external to Drupal (e.g. http://example.com).
*
* If a path cannot be assessed by Drupal's menu handler, then we must
* treat it as potentially insecure.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment