diff --git a/core/CODE_OF_CONDUCT.txt b/core/CODE_OF_CONDUCT.txt new file mode 100644 index 0000000..da47ef3 --- /dev/null +++ b/core/CODE_OF_CONDUCT.txt @@ -0,0 +1,113 @@ +Drupal Code of Conduct +---------------------- + +As our community grows, it is imperative that we preserve the things that got +us here; namely, keeping Drupal a fun, welcoming, challenging, and fair place +to play. The Drupal Code of Conduct (DCOC) states our shared ideals with +respect to conduct. Think of this as coding standards +(https://www.drupal.org/docs/develop/standards) for people. It is an expression +of our ideals, not a rulebook. It is a way to communicate our existing values to +the entire community. + +This code of conduct is based on the one developed by Ubuntu, with the addition +of the Conflict Resolution Policy (https://www.drupal.org/conflict-resolution) +developed by the Drupal Community. + +Discussion about this policy belongs in the Community Working Group's +(https://www.drupal.org/governance/community-working-group) issue tracker +(https://www.drupal.org/project/issues/drupal_cwg). + +For more information, please see https://www.drupal.org/dcoc + +Be considerate. +--------------- + +Our work will be used by other people, and we in turn will depend on the work +of others. Any decision we take will affect users and colleagues, and we should +take those consequences into account when making decisions. Drupal has millions +of users and thousands of contributors. Even if it's not obvious at the time, +our contributions to Drupal will impact the work of others. For example, +changes to code, infrastructure, policy, documentation, and translations during +a release may negatively impact others' work. + +Be respectful. +-------------- + +The Drupal community and its members treat one another with respect. Everyone +can make a valuable contribution to Drupal. We may not always agree, but +disagreement is no excuse for poor behavior and poor manners. We might all +experience some frustration now and then, but we cannot allow that frustration +to turn into a personal attack. It's important to remember that a community +where people feel uncomfortable or threatened is not a productive one. We +expect members of the Drupal community to be respectful when dealing with other +contributors as well as with people outside the Drupal project and with users +of Drupal. + +Be collaborative. +----------------- + +Collaboration is central to Drupal and to the larger free software community. +This collaboration involves individuals working with others in teams within +Drupal, teams working with each other within Drupal, and individuals and teams +within Drupal working with other projects outside. This collaboration reduces +redundancy, and improves the quality of our work. Internally and externally, we +should always be open to collaboration. Wherever possible, we should work +closely with upstream projects and others in the free software community to +coordinate our technical, advocacy, documentation, and other work. Our work +should be done transparently and we should involve as many interested parties +as early as possible. If we decide to take a different approach than others, we +will let them know early, document our work and inform others regularly of our +progress. + +When we disagree, we consult others. +------------------------------------ + +Conflicts in our community can take many forms. Disagreements, social and +technical, are normal, but we do not allow them to persist and fester leaving +others uncertain of the agreed direction. + +We expect individuals to first try to resolve conflicts between themselves in a +constructive manner, asking for help when needed. This approach gives people +more control over the outcome of their dispute. + +If that fails, we escalate the matter to structures with designated leaders to +step in and provide clarity and direction. When conflicts do arise there is a +thought-out and agreed process for resolving them: Conflict Resolution Policy +(https://www.drupal.org/conflict-resolution). + +We will not tolerate bullying or harassment of any member of the Drupal +community. + +If you feel threatened or violated as a result of intimidating, bullying, +harassing, abusive, discriminatory, derogatory, or demeaning conduct, please +speak up and ask it to stop. If you do not feel that you can speak up, contact +the Community Working Group immediately with evidence of the incident. +Incidents of bullying and harrassment can be reported privately and will be +treated seriously and discreetly. Use this Incident Report Form +(https://www.drupal.org/governance/community-working-group/incident-report). + +Please speak up if you notice someone else being subjected to such behavior. +Refer people to our Code of Conduct and point out such behavior is unwelcome. + +When we are unsure, we ask for help. +------------------------------------ + +Nobody knows everything, and nobody is expected to be perfect in the Drupal +community. Asking questions avoids many problems down the road, and so +questions are encouraged. Those who are asked questions should be responsive +and helpful. However, when asking a question, care must be taken to do so in an +appropriate place (http://drupal.org/support). + +Step down considerately. +------------------------ + +Members of every project come and go and Drupal is no different. When somebody +leaves or disengages from the project, in whole or in part, we ask that they do +so in a way that minimizes disruption to the project. This means they should +tell people they are leaving and take the proper steps to ensure that others +can pick up where they left off. +-- +2.13.0 + + + diff --git a/core/lib/Drupal/Component/Datetime/DateTimePlus.php b/core/lib/Drupal/Component/Datetime/DateTimePlus.php index 1161168..607f4aa 100644 --- a/core/lib/Drupal/Component/Datetime/DateTimePlus.php +++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php @@ -278,8 +278,8 @@ public static function createFromFormat($format, $time, $timezone = NULL, $setti * (optional) \DateTimeZone object, time zone string or NULL. NULL uses the * default system time zone. Defaults to NULL. Note that the $timezone * parameter and the current timezone are ignored when the $time parameter - * either is a UNIX timestamp (e.g. @946684800) or specifies a timezone - * (e.g. 2010-01-28T15:00:00+02:00). + * either is a UNIX timestamp (for example @946684800) or specifies a timezone + * (for example 2010-01-28T15:00:00+02:00). * @see http://php.net/manual/datetime.construct.php * @param array $settings * (optional) Keyed array of settings. Defaults to empty array. diff --git a/core/lib/Drupal/Component/DependencyInjection/Container.php b/core/lib/Drupal/Component/DependencyInjection/Container.php index ac6a6f6..b04f030 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Container.php +++ b/core/lib/Drupal/Component/DependencyInjection/Container.php @@ -112,7 +112,7 @@ class Container implements ContainerInterface, ResettableContainerInterface { */ public function __construct(array $container_definition = []) { if (!empty($container_definition) && (!isset($container_definition['machine_format']) || $container_definition['machine_format'] !== TRUE)) { - throw new InvalidArgumentException('The non-optimized format is not supported by this class. Use an optimized machine-readable format instead, e.g. as produced by \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper.'); + throw new InvalidArgumentException('The non-optimized format is not supported by this class. Use an optimized machine-readable format instead, for example as produced by \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper.'); } $this->aliases = isset($container_definition['aliases']) ? $container_definition['aliases'] : []; @@ -452,7 +452,7 @@ protected function resolveServicesAndParameters($arguments) { // Update argument. $argument = $arguments[$key] = $this->parameters[$name]; - // In case there is not a machine readable value (e.g. a service) + // In case there is not a machine readable value (for example a service) // behind this resolved parameter, continue. if (!($argument instanceof \stdClass)) { continue; diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php index dfd2a43..e90d05e 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php +++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php @@ -40,7 +40,7 @@ class OptimizedPhpArrayDumper extends Dumper { * * Service definitions are serialized by default to avoid having to * unserialize the whole container on loading time, which improves early - * bootstrap performance for e.g. the page cache. + * bootstrap performance for for example the page cache. * * @var bool */ diff --git a/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php b/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php index 5d615db..d4893ee 100644 --- a/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php +++ b/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php @@ -29,7 +29,7 @@ class PhpArrayContainer extends Container { */ public function __construct(array $container_definition = []) { if (isset($container_definition['machine_format']) && $container_definition['machine_format'] === TRUE) { - throw new InvalidArgumentException('The machine-optimized format is not supported by this class. Use a human-readable format instead, e.g. as produced by \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper.'); + throw new InvalidArgumentException('The machine-optimized format is not supported by this class. Use a human-readable format instead, for example as produced by \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper.'); } // Do not call the parent's constructor as it would bail on the diff --git a/core/lib/Drupal/Component/FileCache/FileCacheFactory.php b/core/lib/Drupal/Component/FileCache/FileCacheFactory.php index ca68757..545dacc 100644 --- a/core/lib/Drupal/Component/FileCache/FileCacheFactory.php +++ b/core/lib/Drupal/Component/FileCache/FileCacheFactory.php @@ -33,7 +33,7 @@ class FileCacheFactory { * The collection identifier for this FileCache. * @param array $default_configuration * (optional) The default configuration for this FileCache collection. This - * can be used to e.g. specify default usage of a FileCache class. + * can be used to for example specify default usage of a FileCache class. * * @return \Drupal\Component\FileCache\FileCacheInterface * The initialized FileCache object. diff --git a/core/lib/Drupal/Component/Graph/Graph.php b/core/lib/Drupal/Component/Graph/Graph.php index b155faa..94d7634 100644 --- a/core/lib/Drupal/Component/Graph/Graph.php +++ b/core/lib/Drupal/Component/Graph/Graph.php @@ -99,7 +99,7 @@ public function searchAndSort() { * @see \Drupal\Component\Graph\Graph::searchAndSort() */ protected function depthFirstSearch(&$state, $start, &$component = NULL) { - // Assign new component for each new vertex, i.e. when not called recursively. + // Assign new component for each new vertex, that is when not called recursively. if (!isset($component)) { $component = $start; } diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php index c7e6feb..e9ae176 100644 --- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php +++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php @@ -20,12 +20,12 @@ * Each file is stored in its own unique containing directory. The hash is based * on the virtual file name, the containing directory's mtime, and a * cryptographically hard to guess secret string. Thus, even if the hashed file - * name is discovered and replaced by an untrusted file (e.g., via a + * name is discovered and replaced by an untrusted file (for example, via a * move_uploaded_file() invocation by a script that performs insufficient * validation), the directory's mtime gets updated in the process, invalidating * the hash and preventing the untrusted file from getting loaded. * - * This class does not protect against overwriting a file in-place (e.g. a + * This class does not protect against overwriting a file in-place (for example a * malicious module that does a file_put_contents()) since this will not change * the mtime of the directory. MTimeProtectedFileStorage protects against this * at the cost of an additional system call for every load() and exists(). @@ -80,7 +80,7 @@ public function save($name, $data) { // Move the temporary file into the proper directory. Note that POSIX // compliant systems as well as modern Windows perform the rename operation - // atomically, i.e. there is no point at which another process attempting to + // atomically, that is there is no point at which another process attempting to // access the new path will find it missing. $directory = $this->getContainingDirectoryFullPath($name); $this->ensureDirectory($directory); @@ -95,7 +95,7 @@ public function save($name, $data) { // Recall that when subsequently loading the file, the hash is calculated // based on the file name, the containing mtime, and a the secret string. // Hence updating the mtime here is comparable to pointing a symbolic link - // at a new target, i.e., the newly created file. + // at a new target, that is, the newly created file. if ($result) { $result &= touch($directory . '/', $mtime); } diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php index 4f30d9f..31399ac 100644 --- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php +++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php @@ -18,7 +18,7 @@ * Each file is stored in its own unique containing directory. The hash is * based on the virtual file name, the containing directory's mtime, and a * cryptographically hard to guess secret string. Thus, even if the hashed file - * name is discovered and replaced by an untrusted file (e.g., via a + * name is discovered and replaced by an untrusted file (for example, via a * move_uploaded_file() invocation by a script that performs insufficient * validation), the directory's mtime gets updated in the process, invalidating * the hash and preventing the untrusted file from getting loaded. Also, the diff --git a/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php b/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php index c18a704..d12644f 100644 --- a/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php +++ b/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php @@ -69,10 +69,10 @@ public function getDataType(); public function setDataType($data_type); /** - * Determines whether the data is multi-valued, i.e. a list of data items. + * Determines whether the data is multi-valued, that is a list of data items. * * @return bool - * Whether the data is multi-valued; i.e. a list of data items. + * Whether the data is multi-valued; that is a list of data items. */ public function isMultiple(); @@ -153,7 +153,7 @@ public function setConstraints(array $constraints); * Adds a validation constraint. * * @param string $constraint_name - * The name of the constraint to add, i.e. its plugin id. + * The name of the constraint to add, that is its plugin id. * @param array|null $options * The constraint options as required by the constraint plugin, or NULL. * @@ -165,7 +165,7 @@ public function addConstraint($constraint_name, $options = NULL); * Gets a validation constraint. * * @param string $constraint_name - * The name of the constraint, i.e. its plugin id. + * The name of the constraint, that is its plugin id. * * @return array * A validation constraint definition which can be used for instantiating a diff --git a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php index b9f6e02..81097ff 100644 --- a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php +++ b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php @@ -26,7 +26,7 @@ * unvalidated constructor based injection of contexts. * * @param array $configuration - * The plugin configuration, i.e. an array with configuration values keyed + * The plugin configuration, that is an array with configuration values keyed * by configuration option name. The special key 'context' may be used to * initialize the defined contexts by setting it to an array of context * values keyed by context names. diff --git a/core/lib/Drupal/Component/Render/OutputStrategyInterface.php b/core/lib/Drupal/Component/Render/OutputStrategyInterface.php index 3ed9725..e7eb7fc 100644 --- a/core/lib/Drupal/Component/Render/OutputStrategyInterface.php +++ b/core/lib/Drupal/Component/Render/OutputStrategyInterface.php @@ -6,7 +6,7 @@ * Provides an output strategy that formats HTML strings for a given context. * * Output strategies assist in transforming HTML strings into strings that are - * appropriate for a given context (e.g. plain-text), through performing the + * appropriate for a given context (for example plain-text), through performing the * relevant formatting. No sanitization is applied. */ interface OutputStrategyInterface { @@ -15,7 +15,7 @@ * Transforms a given HTML string into to a context-appropriate output string. * * This transformation consists of performing the formatting appropriate to - * a given output context (e.g., plain-text email subjects, HTML attribute + * a given output context (for example, plain-text email subjects, HTML attribute * values). * * @param string|object $string diff --git a/core/lib/Drupal/Component/Utility/Bytes.php b/core/lib/Drupal/Component/Utility/Bytes.php index d625b12..cdb691b 100644 --- a/core/lib/Drupal/Component/Utility/Bytes.php +++ b/core/lib/Drupal/Component/Utility/Bytes.php @@ -19,7 +19,7 @@ class Bytes { * * @param mixed $size * An integer or string size expressed as a number of bytes with optional SI - * or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8 bytes, 9mbytes). + * or IEC binary unit prefix (for example 2, 3K, 5MB, 10G, 6GiB, 8 bytes, 9mbytes). * * @return int * An integer representation of the size in bytes. diff --git a/core/lib/Drupal/Component/Utility/Color.php b/core/lib/Drupal/Component/Utility/Color.php index e3cb56b..cc62567 100644 --- a/core/lib/Drupal/Component/Utility/Color.php +++ b/core/lib/Drupal/Component/Utility/Color.php @@ -12,7 +12,7 @@ class Color { * * @param $hex * The hexadecimal string to validate. May contain a leading '#'. May use - * the shorthand notation (e.g., '123' for '112233'). + * the shorthand notation (for example, '123' for '112233'). * * @return bool * TRUE if $hex is valid or FALSE if it is not. diff --git a/core/lib/Drupal/Component/Utility/Environment.php b/core/lib/Drupal/Component/Utility/Environment.php index bfee60c..c42123d 100644 --- a/core/lib/Drupal/Component/Utility/Environment.php +++ b/core/lib/Drupal/Component/Utility/Environment.php @@ -12,11 +12,11 @@ class Environment { * * @param string $required * The memory required for the operation, expressed as a number of bytes with - * optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8bytes, + * optional SI or IEC binary unit prefix (for example 2, 3K, 5MB, 10G, 6GiB, 8bytes, * 9mbytes). * @param $memory_limit * (optional) The memory limit for the operation, expressed as a number of - * bytes with optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, + * bytes with optional SI or IEC binary unit prefix (for example 2, 3K, 5MB, 10G, * 6GiB, 8bytes, 9mbytes). If no value is passed, the current PHP * memory_limit will be used. Defaults to NULL. * diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php index 353dac2..ea41674 100644 --- a/core/lib/Drupal/Component/Utility/Html.php +++ b/core/lib/Drupal/Component/Utility/Html.php @@ -59,7 +59,7 @@ class Html { * Prepares a string for use as a valid class name. * * Do not pass one string containing multiple classes as they will be - * incorrectly concatenated with dashes, i.e. "one two" will become "one-two". + * incorrectly concatenated with dashes, that is "one two" will become "one-two". * * @param mixed $class * The class name to clean. It can be a string or anything that can be cast diff --git a/core/lib/Drupal/Component/Utility/NestedArray.php b/core/lib/Drupal/Component/Utility/NestedArray.php index 86c7309..898fd5c 100644 --- a/core/lib/Drupal/Component/Utility/NestedArray.php +++ b/core/lib/Drupal/Component/Utility/NestedArray.php @@ -327,7 +327,7 @@ public static function mergeDeepArray(array $arrays, $preserve_integer_keys = FA foreach ($array as $key => $value) { // Renumber integer keys as array_merge_recursive() does unless // $preserve_integer_keys is set to TRUE. Note that PHP automatically - // converts array keys that are integer strings (e.g., '1') to integers. + // converts array keys that are integer strings (for example, '1') to integers. if (is_int($key) && !$preserve_integer_keys) { $result[] = $value; } diff --git a/core/lib/Drupal/Component/Utility/Random.php b/core/lib/Drupal/Component/Utility/Random.php index cf34835..61a9ed7 100644 --- a/core/lib/Drupal/Component/Utility/Random.php +++ b/core/lib/Drupal/Component/Utility/Random.php @@ -93,7 +93,7 @@ public function string($length = 8, $unique = FALSE, $validator = NULL) { * The string will always start with a letter. The letters may be upper or * lower case. This method is better for restricted inputs that do not * accept certain characters. For example, when testing input fields that - * require machine readable values (i.e. without spaces and non-standard + * require machine readable values (that is without spaces and non-standard * characters) this method is best. * * @param int $length diff --git a/core/lib/Drupal/Component/Utility/Unicode.php b/core/lib/Drupal/Component/Utility/Unicode.php index e136a89..b6ee7d7 100644 --- a/core/lib/Drupal/Component/Utility/Unicode.php +++ b/core/lib/Drupal/Component/Utility/Unicode.php @@ -245,7 +245,7 @@ public static function convertToUtf8($data, $encoding) { * * Use this function whenever you want to chop off a string at an unsure * location. On the other hand, if you're sure that you're splitting on a - * character boundary (e.g. after using strpos() or similar), you can safely + * character boundary (for example after using strpos() or similar), you can safely * use substr() instead. * * @param string $string diff --git a/core/lib/Drupal/Component/Utility/UrlHelper.php b/core/lib/Drupal/Component/Utility/UrlHelper.php index 3728035..db3e020 100644 --- a/core/lib/Drupal/Component/Utility/UrlHelper.php +++ b/core/lib/Drupal/Component/Utility/UrlHelper.php @@ -277,7 +277,7 @@ public static function externalIsLocal($url, $base_url) { * Cleaned up and HTML-escaped version of $string. */ public static function filterBadProtocol($string) { - // Get the plain text representation of the attribute value (i.e. its + // Get the plain text representation of the attribute value (that is its // meaning). $string = Html::decodeEntities($string); return Html::escape(static::stripDangerousProtocols($string)); diff --git a/core/lib/Drupal/Component/Utility/Xss.php b/core/lib/Drupal/Component/Utility/Xss.php index f5e99fe..ad78427 100644 --- a/core/lib/Drupal/Component/Utility/Xss.php +++ b/core/lib/Drupal/Component/Utility/Xss.php @@ -37,7 +37,7 @@ class Xss { * - Removes characters and constructs that can trick browsers. * - Makes sure all HTML entities are well-formed. * - Makes sure all HTML tags and attributes are well-formed. - * - Makes sure no HTML tags contain URLs with a disallowed protocol (e.g. + * - Makes sure no HTML tags contain URLs with a disallowed protocol (for example * javascript:). * * @param $string diff --git a/core/lib/Drupal/Core/Access/AccessManagerInterface.php b/core/lib/Drupal/Core/Access/AccessManagerInterface.php index 2ea6a6a..ba2fe39 100644 --- a/core/lib/Drupal/Core/Access/AccessManagerInterface.php +++ b/core/lib/Drupal/Core/Access/AccessManagerInterface.php @@ -30,7 +30,7 @@ * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". */ public function checkNamedRoute($route_name, array $parameters = [], AccountInterface $account = NULL, $return_as_object = FALSE); @@ -50,7 +50,7 @@ public function checkNamedRoute($route_name, array $parameters = [], AccountInte * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". */ public function checkRequest(Request $request, AccountInterface $account = NULL, $return_as_object = FALSE); @@ -75,7 +75,7 @@ public function checkRequest(Request $request, AccountInterface $account = NULL, * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". */ public function check(RouteMatchInterface $route_match, AccountInterface $account = NULL, Request $request = NULL, $return_as_object = FALSE); diff --git a/core/lib/Drupal/Core/Access/AccessResult.php b/core/lib/Drupal/Core/Access/AccessResult.php index 0070e08..313e19f 100644 --- a/core/lib/Drupal/Core/Access/AccessResult.php +++ b/core/lib/Drupal/Core/Access/AccessResult.php @@ -318,13 +318,13 @@ public function orIf(AccessResultInterface $other) { // 1. $other's access result is the one that determines the combined access // result. // 2. This access result is not cacheable and $other's access result is the - // same. i.e. attempt to return a cacheable access result. + // same. that is attempt to return a cacheable access result. // 3. Neither access result is 'forbidden' and both are cacheable: inherit // the other's cacheability metadata because it may turn into a // 'forbidden' for another value of the cache contexts in the // cacheability metadata. In other words: this is necessary to respect // the contagious nature of the 'forbidden' access result. - // e.g. we have two access results A and B. Neither is forbidden. A is + // for example we have two access results A and B. Neither is forbidden. A is // globally cacheable (no cache contexts). B is cacheable per role. If we // don't have merging case 3, then A->orIf(B) will be globally cacheable, // which means that even if a user of a different role logs in, the diff --git a/core/lib/Drupal/Core/Access/AccessibleInterface.php b/core/lib/Drupal/Core/Access/AccessibleInterface.php index eea600a..c2f83ab 100644 --- a/core/lib/Drupal/Core/Access/AccessibleInterface.php +++ b/core/lib/Drupal/Core/Access/AccessibleInterface.php @@ -26,7 +26,7 @@ * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". */ public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE); diff --git a/core/lib/Drupal/Core/Action/ActionInterface.php b/core/lib/Drupal/Core/Action/ActionInterface.php index 5158f96..133caa2 100644 --- a/core/lib/Drupal/Core/Action/ActionInterface.php +++ b/core/lib/Drupal/Core/Action/ActionInterface.php @@ -53,7 +53,7 @@ public function executeMultiple(array $objects); * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". */ public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE); diff --git a/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php b/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php index 30577ef..f52bd0d 100644 --- a/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php +++ b/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php @@ -79,7 +79,7 @@ public function optimize(array $css_assets) { // drupal_css_cache_files. // Drupal contrib can override this default CSS aggregator to keep the same // grouping, optimizing and dumping, but change the strategy that is used to - // determine when the aggregate should be rebuilt (e.g. mtime, HTTPS …). + // determine when the aggregate should be rebuilt (for example mtime, HTTPS …). $map = $this->state->get('drupal_css_cache_files') ?: []; $css_assets = []; foreach ($css_groups as $order => $css_group) { diff --git a/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php b/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php index c3c83e1..e03362b 100644 --- a/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php +++ b/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php @@ -34,9 +34,9 @@ * employed to decide when to use LINK tags and when to use STYLE tags. * * The strategy employed by this class is to use LINK tags for all aggregate - * files and for all files that cannot be aggregated (e.g., if 'preprocess' is + * files and for all files that cannot be aggregated (for example, if 'preprocess' is * set to FALSE or the type is 'external'), and to use STYLE tags for groups - * of files that could be aggregated together but aren't (e.g., if the site-wide + * of files that could be aggregated together but aren't (for example, if the site-wide * aggregation setting is disabled). This results in all LINK tags when * aggregation is enabled, a guarantee that as many or only slightly more tags * are used with aggregation disabled than enabled (so that if the limit were to diff --git a/core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php b/core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php index e9b8bf2..4edeaeb 100644 --- a/core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php +++ b/core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php @@ -79,7 +79,7 @@ public function optimize(array $js_assets) { // system.js_cache_files. // Drupal contrib can override this default JS aggregator to keep the same // grouping, optimizing and dumping, but change the strategy that is used to - // determine when the aggregate should be rebuilt (e.g. mtime, HTTPS …). + // determine when the aggregate should be rebuilt (for example mtime, HTTPS …). $map = $this->state->get('system.js_cache_files') ?: []; $js_assets = []; foreach ($js_groups as $order => $js_group) { diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index 07df709..e8ac00b 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -178,18 +178,18 @@ public function buildByExtension($extension) { if ($source[1] !== '/') { $options['data'] = substr($source, 1); } - // A protocol-free URI (e.g., //cdn.com/example.js) is external. + // A protocol-free URI (for example, //cdn.com/example.js) is external. else { $options['type'] = 'external'; $options['data'] = $source; } } - // A stream wrapper URI (e.g., public://generated_js/example.js). + // A stream wrapper URI (for example, public://generated_js/example.js). elseif ($this->fileValidUri($source)) { $options['data'] = $source; } - // A regular URI (e.g., http://example.com/example.js) without - // 'external' explicitly specified, which may happen if, e.g. + // A regular URI (for example, http://example.com/example.js) without + // 'external' explicitly specified, which may happen if, for example // libraries-override is used. elseif ($this->isValidUri($source)) { $options['type'] = 'external'; @@ -246,9 +246,9 @@ public function buildByExtension($extension) { * The path of the file is relative to the module or theme directory, unless * it starts with a /, in which case it is relative to the Drupal root. If * the file path starts with //, it will be treated as a protocol-free, - * external resource (e.g., //cdn.com/library.js). Full URLs - * (e.g., http://cdn.com/library.js) as well as URLs that use a valid - * stream wrapper (e.g., public://path/to/file.js) are also supported. + * external resource (for example, //cdn.com/library.js). Full URLs + * (for example, http://cdn.com/library.js) as well as URLs that use a valid + * stream wrapper (for example, public://path/to/file.js) are also supported. * - css: A list of categories for which the library provides CSS files. The * available categories are: * - base @@ -414,7 +414,7 @@ protected function isValidUri($string) { * @param array $library * The containing library definition. * @param array $sub_key - * An array containing the sub-keys specifying the library asset, e.g. + * An array containing the sub-keys specifying the library asset, for example * @code['js']@endcode or @code['css', 'component']@endcode * @param array $overrides * Specifies the overrides, this is an array where the key is the asset to @@ -456,7 +456,7 @@ protected function setOverrideValue(array &$library, array $sub_key, array $over */ protected function resolveThemeAssetPath($theme_path, $overriding_asset) { if ($overriding_asset[0] !== '/' && !$this->isValidUri($overriding_asset)) { - // The destination is not an absolute path and it's not a URI (e.g. + // The destination is not an absolute path and it's not a URI (for example // public://generated_js/example.js or http://example.com/js/my_js.js), so // it's relative to the theme. return '/' . $theme_path . '/' . $overriding_asset; diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php b/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php index db86cc1..da12887 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php @@ -8,7 +8,7 @@ * Generate a challenge when access is denied for unauthenticated users. * * On a 403 (access denied), if there are no credentials on the request, some - * authentication methods (e.g. basic auth) require that a challenge is sent to + * authentication methods (for example basic auth) require that a challenge is sent to * the client. */ interface AuthenticationProviderChallengeInterface { diff --git a/core/lib/Drupal/Core/Block/BlockPluginInterface.php b/core/lib/Drupal/Core/Block/BlockPluginInterface.php index b3cf88e..138cbef 100644 --- a/core/lib/Drupal/Core/Block/BlockPluginInterface.php +++ b/core/lib/Drupal/Core/Block/BlockPluginInterface.php @@ -53,7 +53,7 @@ public function label(); * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". * * @see \Drupal\block\BlockAccessControlHandler diff --git a/core/lib/Drupal/Core/Cache/CacheBackendInterface.php b/core/lib/Drupal/Core/Cache/CacheBackendInterface.php index 852305f..83b44d5 100644 --- a/core/lib/Drupal/Core/Cache/CacheBackendInterface.php +++ b/core/lib/Drupal/Core/Cache/CacheBackendInterface.php @@ -83,7 +83,7 @@ public function getMultiple(&$cids, $allow_invalid = FALSE); * - CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should * not be removed unless it is deleted explicitly. * - A Unix timestamp: Indicates that the item will be considered invalid - * after this time, i.e. it will not be returned by get() unless + * after this time, that is it will not be returned by get() unless * $allow_invalid has been set to TRUE. When the item has expired, it may * be permanently deleted by the garbage collector at any time. * @param array $tags diff --git a/core/lib/Drupal/Core/Cache/ChainedFastBackend.php b/core/lib/Drupal/Core/Cache/ChainedFastBackend.php index 9f6be9d..3248889 100644 --- a/core/lib/Drupal/Core/Cache/ChainedFastBackend.php +++ b/core/lib/Drupal/Core/Cache/ChainedFastBackend.php @@ -16,7 +16,7 @@ * * In addition to being useful for sites running on multiple web nodes, this * backend can also be useful for sites running on a single web node where the - * fast backend (e.g., APCu) isn't shareable between the web and CLI processes. + * fast backend (for example, APCu) isn't shareable between the web and CLI processes. * Single-node configurations that don't have that limitation can just use the * fast cache backend directly. * diff --git a/core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php b/core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php index fe7f4f5..edb8296 100644 --- a/core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php @@ -8,7 +8,7 @@ * Defines the CookiesCacheContext service, for "per cookie" caching. * * Cache context ID: 'cookies' (to vary by all cookies). - * Calculated cache context ID: 'cookies:%name', e.g. 'cookies:device_type' (to + * Calculated cache context ID: 'cookies:%name', for example 'cookies:device_type' (to * vary by the 'device_type' cookie). */ class CookiesCacheContext extends RequestStackCacheContextBase implements CalculatedCacheContextInterface { diff --git a/core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php b/core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php index 71db8e6..13db2f3 100644 --- a/core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php @@ -8,7 +8,7 @@ * Defines the HeadersCacheContext service, for "per header" caching. * * Cache context ID: 'headers' (to vary by all headers). - * Calculated cache context ID: 'headers:%name', e.g. 'headers:X-Something' (to + * Calculated cache context ID: 'headers:%name', for example 'headers:X-Something' (to * vary by the 'X-Something' header). */ class HeadersCacheContext extends RequestStackCacheContextBase implements CalculatedCacheContextInterface { diff --git a/core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php b/core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php index cb34256..0b0239f 100644 --- a/core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php @@ -8,7 +8,7 @@ * Defines a cache context for "per page in a pager" caching. * * Cache context ID: 'url.query_args.pagers' (to vary by all pagers). - * Calculated cache context ID: 'url.query_args.pagers:%pager_id', e.g. + * Calculated cache context ID: 'url.query_args.pagers:%pager_id', for example * 'url.query_args.pagers:1' (to vary by the pager with ID 1). */ class PagersCacheContext extends RequestStackCacheContextBase implements CalculatedCacheContextInterface { diff --git a/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php b/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php index a486644..842ee04 100644 --- a/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php @@ -8,7 +8,7 @@ * Defines the QueryArgsCacheContext service, for "per query args" caching. * * Cache context ID: 'url.query_args' (to vary by all query arguments). - * Calculated cache context ID: 'url.query_args:%key', e.g.'url.query_args:foo' + * Calculated cache context ID: 'url.query_args:%key', for example'url.query_args:foo' * (to vary by the 'foo' query argument). */ class QueryArgsCacheContext extends RequestStackCacheContextBase implements CalculatedCacheContextInterface { diff --git a/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php b/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php index 0cd0fbe..c0c6689 100644 --- a/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php @@ -11,7 +11,7 @@ * user.permissions for anything that checks permissions. * * Cache context ID: 'user.roles' (to vary by all roles of the current user). - * Calculated cache context ID: 'user.roles:%role', e.g. 'user.roles:anonymous' + * Calculated cache context ID: 'user.roles:%role', for example 'user.roles:anonymous' * (to vary by the presence/absence of a specific role). */ class UserRolesCacheContext extends UserCacheContextBase implements CalculatedCacheContextInterface { diff --git a/core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php b/core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php index 8015910..d7e33a2 100644 --- a/core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php +++ b/core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php @@ -54,7 +54,7 @@ protected function cacheGet($cid) { * - CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should * not be removed unless it is deleted explicitly. * - A Unix timestamp: Indicates that the item will be considered invalid - * after this time, i.e. it will not be returned by get() unless + * after this time, that is it will not be returned by get() unless * $allow_invalid has been set to TRUE. When the item has expired, it may * be permanently deleted by the garbage collector at any time. * @param array $tags diff --git a/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php b/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php index 3b9f654..c0ccab6 100644 --- a/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php +++ b/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php @@ -15,7 +15,7 @@ class BootstrapConfigStorageFactory { * * @param $class_loader * The class loader. Normally Composer's ClassLoader, as included by the - * front controller, but may also be decorated; e.g., + * front controller, but may also be decorated; for example, * \Symfony\Component\ClassLoader\ApcClassLoader. * * @return \Drupal\Core\Config\StorageInterface diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index b58f963..c07c140 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -923,7 +923,7 @@ protected function importConfig($collection, $op, $name) { * Allow modules to take over configuration change operations for higher-level * configuration data. * - * @todo Add support for other extension types; e.g., themes etc. + * @todo Add support for other extension types; for example, themes etc. * * @param string $collection * The configuration collection. diff --git a/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php index 3d7077b..8ef75e7 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php +++ b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php @@ -24,7 +24,7 @@ * be installed when the Node module is installed after Views. * * @param string $type - * The extension type; e.g., 'module' or 'theme'. + * The extension type; for example, 'module' or 'theme'. * @param string $name * The name of the module or theme to install default configuration for. * diff --git a/core/lib/Drupal/Core/Config/ConfigManagerInterface.php b/core/lib/Drupal/Core/Config/ConfigManagerInterface.php index 2340c8a..a609dee 100644 --- a/core/lib/Drupal/Core/Config/ConfigManagerInterface.php +++ b/core/lib/Drupal/Core/Config/ConfigManagerInterface.php @@ -84,7 +84,7 @@ public function createSnapshot(StorageInterface $source_storage, StorageInterfac * Uninstalls the configuration of a given extension. * * @param string $type - * The extension type; e.g., 'module' or 'theme'. + * The extension type; for example, 'module' or 'theme'. * @param string $name * The name of the module or theme to install configuration for. */ diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php index 723ba53..e53d2f5 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php @@ -22,10 +22,10 @@ * parts, separated by a dot: * - config_prefix: A string denoting the owner (module/extension) of the * configuration object, followed by arbitrary other namespace identifiers - * that are declared by the owning extension; e.g., 'node.type'. The + * that are declared by the owning extension; for example, 'node.type'. The * config_prefix does NOT contain a trailing dot. It is defined by the entity * type's annotation. - * - ID: A string denoting the entity ID within the entity type namespace; e.g., + * - ID: A string denoting the entity ID within the entity type namespace; for example, * 'article'. Entity IDs may contain dots/periods. The entire remaining string * after the config_prefix in a config name forms the entity ID. Additional or * custom suffixes are not possible. @@ -189,7 +189,7 @@ protected function doLoadMultiple(array $ids = NULL) { $entities = $this->mapFromStorageRecords($records, $configs); // Config entities wrap config objects, and therefore they need to inherit - // the cacheability metadata of config objects (to ensure e.g. additional + // the cacheability metadata of config objects (to ensure for example additional // cacheability metadata added by config overrides is not lost). foreach ($entities as $id => $entity) { // But rather than simply inheriting all cacheability metadata of config diff --git a/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php b/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php index 740fde1..0e5518e 100644 --- a/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php +++ b/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php @@ -36,7 +36,7 @@ public function getElements(); * Gets a contained typed configuration element. * * @param $name - * The name of the property to get; e.g., 'title' or 'name'. Nested + * The name of the property to get; for example, 'title' or 'name'. Nested * elements can be get using multiple dot delimited names, for example, * 'page.front'. * diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index 100ef68..cbc1162 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -364,7 +364,7 @@ public function tablePrefix($table = 'default') { * * @return array * An array of un-prefixed table names, keyed by their fully qualified table - * names (i.e. prefix + table_name). + * names (that is prefix + table_name). */ public function getUnprefixedTablesMap() { return $this->unprefixedTablesMap; @@ -645,7 +645,7 @@ public function query($query, array $args = [], $options = []) { } catch (\PDOException $e) { // Most database drivers will return NULL here, but some of them - // (e.g. the SQLite driver) may need to re-run the query, so the return + // (for example the SQLite driver) may need to re-run the query, so the return // value will be the same as for static::query(). return $this->handleQueryException($e, $query, $args, $options); } diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php index 96dea95..2b27fa0 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php @@ -490,7 +490,7 @@ public function renameTable($table, $new_name) { $indexes = $this->connection->query('SELECT indexname FROM pg_indexes WHERE schemaname = :schema AND tablename = :table', [':schema' => $old_schema, ':table' => $old_table_name]); foreach ($indexes as $index) { - // Get the index type by suffix, e.g. idx/key/pkey + // Get the index type by suffix, for example idx/key/pkey $index_type = substr($index->indexname, strrpos($index->indexname, '_') + 1); // If the index is already rewritten by ensureIdentifiersLength() to not diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php index a7c1496..d925fed 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php @@ -341,7 +341,7 @@ public function prepare($statement, array $driver_options = []) { protected function handleQueryException(\PDOException $e, $query, array $args = [], $options = []) { // The database schema might be changed by another process in between the // time that the statement was prepared and the time the statement was run - // (e.g. usually happens when running tests). In this case, we need to + // (for example usually happens when running tests). In this case, we need to // re-run the query. // @see http://www.sqlite.org/faq.html#q15 // @see http://www.sqlite.org/rescode.html#schema diff --git a/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php b/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php index 6c6b87c..89bf0dd 100644 --- a/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php +++ b/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php @@ -5,7 +5,7 @@ /** * Exception thrown if a query would violate an integrity constraint. * - * This exception is thrown e.g. when trying to insert a row that would violate + * This exception is thrown for example when trying to insert a row that would violate * a unique key constraint. */ class IntegrityConstraintViolationException extends \RuntimeException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/InvalidQueryException.php b/core/lib/Drupal/Core/Database/InvalidQueryException.php index 73e5c81..789974d 100644 --- a/core/lib/Drupal/Core/Database/InvalidQueryException.php +++ b/core/lib/Drupal/Core/Database/InvalidQueryException.php @@ -5,7 +5,7 @@ /** * Exception thrown if a query would be invalid. * - * This exception is thrown e.g. when trying to have an IN condition with an + * This exception is thrown for example when trying to have an IN condition with an * empty array. */ class InvalidQueryException extends \InvalidArgumentException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/Query/ConditionInterface.php b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php index 221f0e2..7e40020 100644 --- a/core/lib/Drupal/Core/Database/Query/ConditionInterface.php +++ b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php @@ -15,7 +15,7 @@ * This method takes 1 to 3 parameters. * * If called with 1 parameter, it should be a ConditionInterface that in - * itself forms a valid where clause. Use e.g. to build clauses with nested + * itself forms a valid where clause. Use for example to build clauses with nested * AND's and OR's. * * If called with 2 parameters, they are taken as $field and $value with @@ -49,14 +49,14 @@ * operator, this will be a scalar or an array. As SQL accepts select * queries on any place where a scalar value or set is expected, $value may * also be a(n array of) SelectInterface(s). If $operator is a unary - * operator, e.g. IS NULL, $value will be ignored and should be null. If - * the operator requires a subquery, e.g. EXISTS, the $field will be ignored + * operator, for example IS NULL, $value will be ignored and should be null. If + * the operator requires a subquery, for example EXISTS, the $field will be ignored * and $value should be a SelectInterface object. * @param string|null $operator * The operator to use. Supported for all supported databases are at least: * - The comparison operators =, <>, <, <=, >, >=. * - The operators (NOT) BETWEEN, (NOT) IN, (NOT) EXISTS, (NOT) LIKE. - * Other operators (e.g. LIKE, BINARY) may or may not work. Defaults to =. + * Other operators (for example LIKE, BINARY) may or may not work. Defaults to =. * * @return \Drupal\Core\Database\Query\ConditionInterface * The called object. diff --git a/core/lib/Drupal/Core/Database/Query/Select.php b/core/lib/Drupal/Core/Database/Query/Select.php index 61cb397..a63e61c 100644 --- a/core/lib/Drupal/Core/Database/Query/Select.php +++ b/core/lib/Drupal/Core/Database/Query/Select.php @@ -819,7 +819,7 @@ public function __toString() { } foreach ($this->fields as $field) { // Always use the AS keyword for field aliases, as some - // databases require it (e.g., PostgreSQL). + // databases require it (for example, PostgreSQL). $fields[] = (isset($field['table']) ? $this->connection->escapeTable($field['table']) . '.' : '') . $this->connection->escapeField($field['field']) . ' AS ' . $this->connection->escapeAlias($field['alias']); } foreach ($this->expressions as $expression) { @@ -851,7 +851,7 @@ public function __toString() { } // Don't use the AS keyword for table aliases, as some - // databases don't support it (e.g., Oracle). + // databases don't support it (for example, Oracle). $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); if (!empty($table['condition'])) { diff --git a/core/lib/Drupal/Core/Database/StatementInterface.php b/core/lib/Drupal/Core/Database/StatementInterface.php index a97043a..5333e3e 100644 --- a/core/lib/Drupal/Core/Database/StatementInterface.php +++ b/core/lib/Drupal/Core/Database/StatementInterface.php @@ -34,7 +34,7 @@ * and lastly, it also enforces that a custom PDOStatement interface (like * this) omits the constructor (declaring it results in fatal errors * complaining about "the access type must not be public" if it is public, and - * "the access type must be omitted" if it is protected; i.e., conflicting + * "the access type must be omitted" if it is protected; that is, conflicting * statements). The access type has to be protected. */ // protected function __construct(Connection $dbh); diff --git a/core/lib/Drupal/Core/Database/database.api.php b/core/lib/Drupal/Core/Database/database.api.php index 45a5618..280fe36 100644 --- a/core/lib/Drupal/Core/Database/database.api.php +++ b/core/lib/Drupal/Core/Database/database.api.php @@ -272,8 +272,8 @@ * - 'size': The data size: 'tiny', 'small', 'medium', 'normal', * 'big'. This is a hint about the largest value the field will * store and determines which of the database engine specific - * datatypes will be used (e.g. on MySQL, TINYINT vs. INT vs. BIGINT). - * 'normal', the default, selects the base type (e.g. on MySQL, + * datatypes will be used (for example on MySQL, TINYINT vs. INT vs. BIGINT). + * 'normal', the default, selects the base type (for example on MySQL, * INT, VARCHAR, BLOB, etc.). * Not all sizes are available for all data types. See * DatabaseSchema::getFieldTypeMap() for possible combinations. diff --git a/core/lib/Drupal/Core/Datetime/DateFormatter.php b/core/lib/Drupal/Core/Datetime/DateFormatter.php index 7729080..cb86aec 100644 --- a/core/lib/Drupal/Core/Datetime/DateFormatter.php +++ b/core/lib/Drupal/Core/Datetime/DateFormatter.php @@ -59,7 +59,7 @@ class DateFormatter implements DateFormatterInterface { /** * Contains the different date interval units. * - * This array is keyed by strings representing the unit (e.g. + * This array is keyed by strings representing the unit (for example * '1 year|@count years') and with the amount of values of the unit in * seconds. * diff --git a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php index f921b45..bf0b613 100644 --- a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php +++ b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php @@ -36,8 +36,8 @@ class DrupalDateTime extends DateTimePlus { * PHP DateTimeZone object, string or NULL allowed. * Defaults to NULL. Note that the $timezone parameter and the current * timezone are ignored when the $time parameter either is a UNIX timestamp - * (e.g. @946684800) or specifies a timezone - * (e.g. 2010-01-28T15:00:00+02:00). + * (for example @946684800) or specifies a timezone + * (for example 2010-01-28T15:00:00+02:00). * @see http://php.net/manual/datetime.construct.php * @param array $settings * - validate_format: (optional) Boolean choice to validate the diff --git a/core/lib/Drupal/Core/Datetime/Element/Datelist.php b/core/lib/Drupal/Core/Datetime/Element/Datelist.php index 6f110d3..76c52be 100644 --- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php +++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php @@ -144,7 +144,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form * in either position means that specific year. A +/- value describes a * dynamic value that is that many years earlier or later than the current * year at the time the form is displayed. Defaults to '1900:2050'. - * - #date_increment: The increment to use for minutes and seconds, i.e. + * - #date_increment: The increment to use for minutes and seconds, that is * '15' would show only :00, :15, :30 and :45. Defaults to 1 to show every * minute. * - #date_timezone: The local timezone to use when creating dates. Generally diff --git a/core/lib/Drupal/Core/Datetime/Element/Datetime.php b/core/lib/Drupal/Core/Datetime/Element/Datetime.php index e238ff5..f6d7070 100644 --- a/core/lib/Drupal/Core/Datetime/Element/Datetime.php +++ b/core/lib/Drupal/Core/Datetime/Element/Datetime.php @@ -181,7 +181,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form * dynamic value that is that many years earlier or later than the current * year at the time the form is displayed. Used in jQueryUI datepicker year * range and HTML5 min/max date settings. Defaults to '1900:2050'. - * - #date_increment: The increment to use for minutes and seconds, i.e. + * - #date_increment: The increment to use for minutes and seconds, that is * '15' would show only :00, :15, :30 and :45. Used for HTML5 step values and * jQueryUI datepicker settings. Defaults to 1 to show every minute. * - #date_timezone: The local timezone to use when creating dates. Generally @@ -237,7 +237,7 @@ public static function processDatetime(&$element, FormStateInterface $form_state // placeholders are invalid for HTML5 date and datetime, so an example // format is appended to the title to appear in tooltips. $extra_attributes = [ - 'title' => t('Date (e.g. @format)', ['@format' => static::formatExample($date_format)]), + 'title' => t('Date (for example @format)', ['@format' => static::formatExample($date_format)]), 'type' => $element['#date_date_element'], ]; @@ -284,7 +284,7 @@ public static function processDatetime(&$element, FormStateInterface $form_state // Adds the HTML5 attributes. $extra_attributes = [ - 'title' => t('Time (e.g. @format)', ['@format' => static::formatExample($time_format)]), + 'title' => t('Time (for example @format)', ['@format' => static::formatExample($time_format)]), 'type' => $element['#date_time_element'], 'step' => $element['#date_increment'], ]; diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 37ed0e9..fec0e92 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -44,8 +44,8 @@ * service providers to add their services to the container. Core provides the * CoreServiceProvider, which, in addition to registering any core services that * cannot be registered in the core.services.yaml file, adds any compiler passes - * needed by core, e.g. for processing tagged services. Each module can add its - * own service provider, i.e. a class implementing + * needed by core, for example for processing tagged services. Each module can add its + * own service provider, that is a class implementing * Drupal\Core\DependencyInjection\ServiceProvider, to register services to the * container, or modify existing services. */ @@ -55,7 +55,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { /** * Holds the class used for dumping the container to a PHP array. * - * In combination with swapping the container class this is useful to e.g. + * In combination with swapping the container class this is useful to for example * dump to the human-readable PHP array format to debug the container * definition in an easier way. * @@ -109,7 +109,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { protected $container; /** - * The environment, e.g. 'testing', 'install'. + * The environment, for example 'testing', 'install'. * * @var string */ @@ -248,10 +248,10 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { * The request. * @param $class_loader * The class loader. Normally Composer's ClassLoader, as included by the - * front controller, but may also be decorated; e.g., + * front controller, but may also be decorated; for example, * \Symfony\Component\ClassLoader\ApcClassLoader. * @param string $environment - * String indicating the environment, e.g. 'prod' or 'dev'. + * String indicating the environment, for example 'prod' or 'dev'. * @param bool $allow_dumping * (optional) FALSE to stop the container from being written to or read * from disk. Defaults to TRUE. @@ -275,10 +275,10 @@ public static function createFromRequest(Request $request, $class_loader, $envir * Constructs a DrupalKernel object. * * @param string $environment - * String indicating the environment, e.g. 'prod' or 'dev'. + * String indicating the environment, for example 'prod' or 'dev'. * @param $class_loader * The class loader. Normally \Composer\Autoload\ClassLoader, as included by - * the front controller, but may also be decorated; e.g., + * the front controller, but may also be decorated; for example, * \Symfony\Component\ClassLoader\ApcClassLoader. * @param bool $allow_dumping * (optional) FALSE to stop the container from being written to or read @@ -647,7 +647,7 @@ public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = $this->initializeSettings($request); // Redirect the user to the installation script if Drupal has not been - // installed yet (i.e., if no $databases array has been defined in the + // installed yet (that is, if no $databases array has been defined in the // settings.php file) and we are not already installing. if (!Database::getConnectionInfo() && !drupal_installation_attempted() && PHP_SAPI !== 'cli') { $response = new RedirectResponse($request->getBasePath() . '/core/install.php', 302, ['Cache-Control' => 'no-cache']); @@ -997,7 +997,7 @@ public static function bootEnvironment($app_root = NULL) { if ($test_prefix = drupal_valid_test_ua()) { $test_db = new TestDatabase($test_prefix); // Only code that interfaces directly with tests should rely on this - // constant; e.g., the error/exception handler conditionally adds further + // constant; for example, the error/exception handler conditionally adds further // error information into HTTP response headers that are consumed by // Simpletest's internal browser. define('DRUPAL_TEST_IN_CHILD_SITE', TRUE); @@ -1292,7 +1292,7 @@ protected function compileContainer() { } // Identify all services whose instances should be persisted when rebuilding - // the container during the lifetime of the kernel (e.g., during a kernel + // the container during the lifetime of the kernel (for example, during a kernel // reboot). Include synthetic services, because by definition, they cannot // be automatically reinstantiated. Also include services tagged to persist. $persist_ids = []; @@ -1380,7 +1380,7 @@ protected function getHttpKernel() { */ protected function getConfigStorage() { if (!isset($this->configStorage)) { - // The active configuration storage may not exist yet; e.g., in the early + // The active configuration storage may not exist yet; for example, in the early // installer. Catch the exception thrown by config_get_config_directory(). try { $this->configStorage = BootstrapConfigStorageFactory::get($this->classLoader); @@ -1456,7 +1456,7 @@ protected function getModuleNamespacesPsr4($module_file_names) { * associated with this namespace. * @param object $class_loader * The class loader. Normally \Composer\Autoload\ClassLoader, as included by - * the front controller, but may also be decorated; e.g., + * the front controller, but may also be decorated; for example, * \Symfony\Component\ClassLoader\ApcClassLoader. */ protected function classLoaderAddMultiplePsr4(array $namespaces = [], $class_loader = NULL) { diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 6b999c6..facb1fb 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -1033,7 +1033,7 @@ public function updateOriginalValues() { /** * Implements the magic method for getting object properties. * - * @todo: A lot of code still uses non-fields (e.g. $entity->content in view + * @todo: A lot of code still uses non-fields (for example $entity->content in view * builders) by reference. Clean that up. */ public function &__get($name) { diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php index 92bbbae..2be5398 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -224,7 +224,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { /** * Gets the names of all fields edited in the form. * - * If the entity form customly adds some fields to the form (i.e. without + * If the entity form customly adds some fields to the form (that is without * using the form display), it needs to add its fields here and override * flagViolations() for displaying the violations. * @@ -241,10 +241,10 @@ protected function getEditedFieldNames(FormStateInterface $form_state) { /** * Flags violations for the current form. * - * If the entity form customly adds some fields to the form (i.e. without + * If the entity form customly adds some fields to the form (that is without * using the form display), it needs to add its fields to array returned by * getEditedFieldNames() and overwrite this method in order to show any - * violations for those fields; e.g.: + * violations for those fields; for example: * @code * foreach ($violations->getByField('name') as $violation) { * $form_state->setErrorByName('name', $violation->getMessage()); diff --git a/core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php b/core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php index 9688b1f..be17041 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php @@ -65,7 +65,7 @@ public function isDefaultFormLangcode(FormStateInterface $form_state); * validation logic, but define further validation constraints using the * entity validation API and/or provide a new validation constraint if * necessary. This is the only way to ensure that the validation logic - * is correctly applied independently of form submissions; e.g., for REST + * is correctly applied independently of form submissions; for example, for REST * requests. * For more information about entity validation, see * https://www.drupal.org/node/2015613. diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php index a004eba..e0eff9d 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -959,7 +959,7 @@ public function loadUnchanged($id) { // The default implementation in the parent class unsets the current cache // and then reloads the entity. That is slow, especially if this is done - // repeatedly in the same request, e.g. when validating and then saving + // repeatedly in the same request, for example when validating and then saving // an entity. Optimize this for content entities by trying to load them // directly from the persistent cache again, as in contrast to the static // cache the persistent one will never be changed until the entity is saved. diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php index 983eec8..bf7c0f7 100644 --- a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php +++ b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php @@ -66,7 +66,7 @@ public function buildTitle(array $page) { // If the entity's label is rendered using a field formatter, set the // rendered title field formatter as the page title instead of the default // plain text title. This allows attributes set on the field to propagate - // correctly (e.g. RDFa, in-place editing). + // correctly (for example RDFa, in-place editing). if ($entity instanceof FieldableEntityInterface) { $label_field = $entity->getEntityType()->getKey('label'); if (isset($page[$label_field])) { diff --git a/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php b/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php index 38baa15..ae40db8 100644 --- a/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php +++ b/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php @@ -76,7 +76,7 @@ public function removeComponent($name); public function getHighestWeight(); /** - * Gets the renderer plugin for a field (e.g. widget, formatter). + * Gets the renderer plugin for a field (for example widget, formatter). * * @param string $field_name * The field name. diff --git a/core/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php b/core/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php index ba6117d..bdfc611 100644 --- a/core/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php +++ b/core/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php @@ -36,7 +36,7 @@ * // widget is 'single-value' (provides the input for one field value, * // most common case), and will therefore be repeated as many times as * // needed, or 'multiple-values' (one single widget allows the input of - * // several values; e.g., checkboxes, select box, etc.). + * // several values; for example, checkboxes, select box, etc.). * 'field_foo' => array( * '#access' => TRUE if the current user has 'edit' grants for the field, * FALSE if not. diff --git a/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php b/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php index cbe91d9..af8f8ca 100644 --- a/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php +++ b/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php @@ -38,7 +38,7 @@ public function getInfo() { // handler is performed at another level on the extracted form values. $info['#validate_reference'] = TRUE; // IMPORTANT! This should only be set to FALSE if the #default_value - // property is processed at another level (e.g. by a Field API widget) and + // property is processed at another level (for example by a Field API widget) and // its value is properly checked for access. $info['#process_default_value'] = TRUE; diff --git a/core/lib/Drupal/Core/Entity/EntityAccessCheck.php b/core/lib/Drupal/Core/Entity/EntityAccessCheck.php index 8ca8cf6..1ee09ff 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessCheck.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessCheck.php @@ -39,7 +39,7 @@ class EntityAccessCheck implements AccessInterface { * type: entity:{entity_type} * @endcode * The route match parameter corresponding to the stub name is checked to - * see if it is entity-like i.e. implements EntityInterface. + * see if it is entity-like that is implements EntityInterface. * * @see \Drupal\Core\ParamConverter\EntityConverter * diff --git a/core/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php b/core/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php index 5532996..e9f914c 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php @@ -33,7 +33,7 @@ * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". */ public function access(EntityInterface $entity, $operation, AccountInterface $account = NULL, $return_as_object = FALSE); @@ -57,7 +57,7 @@ public function access(EntityInterface $entity, $operation, AccountInterface $ac * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". */ public function createAccess($entity_bundle = NULL, AccountInterface $account = NULL, array $context = [], $return_as_object = FALSE); @@ -104,7 +104,7 @@ public function setModuleHandler(ModuleHandlerInterface $module_handler); * The access result. Returns a boolean if $return_as_object is FALSE (this * is the default) and otherwise an AccessResultInterface object. * When a boolean is returned, the result of AccessInterface::isAllowed() is - * returned, i.e. TRUE means access is explicitly allowed, FALSE means + * returned, that is TRUE means access is explicitly allowed, FALSE means * access is either explicitly forbidden or "no opinion". * * @see \Drupal\Core\Entity\EntityAccessControlHandlerInterface::access() diff --git a/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php b/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php index 2cede4d..52837a4 100644 --- a/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php +++ b/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php @@ -42,7 +42,7 @@ public function __construct(SelectionPluginManagerInterface $selection_manager) * * @return array * An array of matched entity labels, in the format required by the AJAX - * autocomplete API (e.g. array('value' => $value, 'label' => $label)). + * autocomplete API (for example array('value' => $value, 'label' => $label)). * * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException * Thrown when the current user doesn't have access to the specified entity. diff --git a/core/lib/Drupal/Core/Entity/EntityBundleListenerInterface.php b/core/lib/Drupal/Core/Entity/EntityBundleListenerInterface.php index b9cba3b..fa0fea9 100644 --- a/core/lib/Drupal/Core/Entity/EntityBundleListenerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityBundleListenerInterface.php @@ -15,7 +15,7 @@ * @param string $bundle * The name of the bundle created. * @param string $entity_type_id - * The entity type to which the bundle is bound; e.g. 'node' or 'user'. + * The entity type to which the bundle is bound; for example 'node' or 'user'. */ public function onBundleCreate($bundle, $entity_type_id); @@ -27,7 +27,7 @@ public function onBundleCreate($bundle, $entity_type_id); * @param string $bundle * The name of the bundle being deleted. * @param string $entity_type_id - * The entity type to which the bundle is bound; e.g. 'node' or 'user'. + * The entity type to which the bundle is bound; for example 'node' or 'user'. */ public function onBundleDelete($bundle, $entity_type_id); diff --git a/core/lib/Drupal/Core/Entity/EntityChangedInterface.php b/core/lib/Drupal/Core/Entity/EntityChangedInterface.php index 2c92b0c..2518d53 100644 --- a/core/lib/Drupal/Core/Entity/EntityChangedInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityChangedInterface.php @@ -39,7 +39,7 @@ public function setChangedTime($timestamp); * * This method will return the highest timestamp across all translations. To * check that no translation is older than in another version of the entity - * (e.g. to avoid overwriting newer translations with old data), compare each + * (for example to avoid overwriting newer translations with old data), compare each * translation to the other version individually. * * @return int diff --git a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php index 7754170..63e86d9 100644 --- a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php @@ -8,7 +8,7 @@ * Defines an interface for managing entity definition updates. * * During the application lifetime, the definitions of various entity types and - * their data components (e.g., fields for fieldable entity types) can change. + * their data components (for example, fields for fieldable entity types) can change. * For example, updated code can be deployed. Some entity handlers may need to * perform complex or long-running logic in response to the change. For * example, a SQL-based storage handler may need to update the database schema. diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php index 34ce858..45aec61 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php @@ -94,7 +94,7 @@ protected $plugins = []; /** - * Context in which this entity will be used (e.g. 'view', 'form'). + * Context in which this entity will be used (for example 'view', 'form'). * * @var string */ diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php index fe7f105..39ffe3e 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php @@ -38,7 +38,7 @@ * Whether or not this form or view mode has custom settings by default. * * If FALSE, entities displayed in this mode will reuse the 'default' display - * settings by default (e.g. right after the module exposing the form or view + * settings by default (for example right after the module exposing the form or view * mode is enabled), but administrators can later use the Field UI to apply * custom display settings specific to the form or view mode. * diff --git a/core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php index 5a5b43f..17b1bcd 100644 --- a/core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php @@ -46,7 +46,7 @@ public function getFieldDefinitions($entity_type_id, $bundle); * * This returns all field storage definitions for base fields and bundle * fields of an entity type. Note that field storage definitions of a base - * field equal the full base field definition (i.e. they implement + * field equal the full base field definition (that is they implement * FieldDefinitionInterface), while the storage definitions for bundle fields * may implement FieldStorageDefinitionInterface only. * diff --git a/core/lib/Drupal/Core/Entity/EntityForm.php b/core/lib/Drupal/Core/Entity/EntityForm.php index 25b837b..48fc48c 100644 --- a/core/lib/Drupal/Core/Entity/EntityForm.php +++ b/core/lib/Drupal/Core/Entity/EntityForm.php @@ -171,12 +171,12 @@ public function processForm($element, FormStateInterface $form_state, $form) { * Form element #after_build callback: Updates the entity with submitted data. * * Updates the internal $this->entity object with submitted values when the - * form is being rebuilt (e.g. submitted via AJAX), so that subsequent - * processing (e.g. AJAX callbacks) can rely on it. + * form is being rebuilt (for example submitted via AJAX), so that subsequent + * processing (for example AJAX callbacks) can rely on it. */ public function afterBuild(array $element, FormStateInterface $form_state) { // Rebuild the entity if #after_build is being called as part of a form - // rebuild, i.e. if we are processing input. + // rebuild, that is if we are processing input. if ($form_state->isProcessingInput()) { $this->entity = $this->buildEntity($element, $form_state); } diff --git a/core/lib/Drupal/Core/Entity/EntityFormInterface.php b/core/lib/Drupal/Core/Entity/EntityFormInterface.php index 2c29360..ed808a4 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityFormInterface.php @@ -47,7 +47,7 @@ public function getEntity(); * Sets the form entity which will be used for populating form element * defaults. Usually, the form entity gets updated by * \Drupal\Core\Entity\EntityFormInterface::submit(), however this may - * be used to completely exchange the form entity, e.g. when preparing the + * be used to completely exchange the form entity, for example when preparing the * rebuild of a multi-step form. * * @param \Drupal\Core\Entity\EntityInterface $entity diff --git a/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php index 4d8437d..9540c65 100644 --- a/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php @@ -17,7 +17,7 @@ * @param string $target_type * The target entity type. * @param string $base_plugin_id - * The base plugin ID (e.g. 'default' or 'views'). + * The base plugin ID (for example 'default' or 'views'). * * @return string * The plugin ID. diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 28f5b4e..c207290 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -120,7 +120,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { protected $bundle_of = NULL; /** - * The human-readable name of the entity bundles, e.g. Vocabulary. + * The human-readable name of the entity bundles, for example Vocabulary. * * @var string|null */ diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index 7d994ca..68069c3 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -74,7 +74,7 @@ public function getOriginalClass(); * the entities of this type are not revisionable. * - bundle: (optional) The name of the property that contains the bundle * name for the entity. The bundle name defines which set of fields are - * attached to the entity (e.g. what nodes call "content type"). This + * attached to the entity (for example what nodes call "content type"). This * entry can be omitted if this entity type exposes a single bundle (such * that all entities have the same collection of fields). The name of this * single bundle will be the same as the entity type. @@ -217,7 +217,7 @@ public function setStorageClass($class); * Gets the form class for a specific operation. * * @param string $operation - * The name of the operation to use, e.g., 'default'. + * The name of the operation to use, for example, 'default'. * * @return string * The class for this operation's form for this entity type. @@ -826,7 +826,7 @@ public function setConstraints(array $constraints); * details on how constraints are defined. * * @param string $constraint_name - * The name of the constraint to add, i.e. its plugin id. + * The name of the constraint to add, that is its plugin id. * @param array|null $options * The constraint options as required by the constraint plugin, or NULL. * @@ -842,7 +842,7 @@ public function addConstraint($constraint_name, $options = NULL); * * @return array * An associative array containing the following keys: - * - 'type': The config dependency type (e.g. 'module', 'config'). + * - 'type': The config dependency type (for example 'module', 'config'). * - 'name': The name of the config dependency. */ public function getBundleConfigDependency($bundle); diff --git a/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php index d395be2..83f0ced 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php @@ -62,7 +62,7 @@ public function getListBuilder($entity_type); * @param string $entity_type * The entity type for this form. * @param string $operation - * The name of the operation to use, e.g., 'default'. + * The name of the operation to use, for example, 'default'. * * @return \Drupal\Core\Entity\EntityFormInterface * A form instance. diff --git a/core/lib/Drupal/Core/Entity/EntityTypeRepositoryInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeRepositoryInterface.php index 5bb2c8d..92c6253 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeRepositoryInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeRepositoryInterface.php @@ -11,7 +11,7 @@ * Builds a list of entity type labels suitable for a Form API options list. * * @param bool $group - * (optional) Whether to group entity types by plugin group (e.g. 'content', + * (optional) Whether to group entity types by plugin group (for example 'content', * 'config'). Defaults to FALSE. * * @return array diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityInterface.php b/core/lib/Drupal/Core/Entity/FieldableEntityInterface.php index d21a2a8..dc4687c 100644 --- a/core/lib/Drupal/Core/Entity/FieldableEntityInterface.php +++ b/core/lib/Drupal/Core/Entity/FieldableEntityInterface.php @@ -66,7 +66,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type); * the recommended approach except in cases where an entity type needs to * provide a bundle-specific base field override that is decoupled from * configuration. Note that for most entity types, the bundles themselves are - * derived from configuration (e.g., 'node' bundles are managed via + * derived from configuration (for example, 'node' bundles are managed via * 'node_type' configuration entities), so decoupling bundle-specific base * field overrides from configuration only makes sense for entity types that * also decouple their bundles from configuration. In cases where both this @@ -140,7 +140,7 @@ public function toArray(); * Gets a field item list. * * @param string $field_name - * The name of the field to get; e.g., 'title' or 'name'. + * The name of the field to get; for example, 'title' or 'name'. * * @return \Drupal\Core\Field\FieldItemListInterface * The field item list, containing the field items. @@ -154,7 +154,7 @@ public function get($field_name); * Sets a field value. * * @param string $field_name - * The name of the field to set; e.g., 'title' or 'name'. + * The name of the field to set; for example, 'title' or 'name'. * @param mixed $value * The value to set, or NULL to unset the field. * @param bool $notify diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php index b0b94b8..92b7d09 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php +++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php @@ -21,7 +21,7 @@ * @DataType( * id = "entity", * label = @Translation("Entity"), - * description = @Translation("All kind of entities, e.g. nodes, comments or users."), + * description = @Translation("All kind of entities, for example nodes, comments or users."), * deriver = "\Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver", * definition_class = "\Drupal\Core\Entity\TypedData\EntityDataDefinition" * ) diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php index 6cf57eb..adafc3a 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php +++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php @@ -9,9 +9,9 @@ * Defines an 'entity_reference' data type. * * This serves as 'entity' property of entity reference field items and gets - * its value set from the parent, i.e. LanguageItem. + * its value set from the parent, that is LanguageItem. * - * The plain value of this reference is the entity object, i.e. an instance of + * The plain value of this reference is the entity object, that is an instance of * \Drupal\Core\Entity\EntityInterface. For setting the value the entity object * or the entity ID may be passed. * diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/CompositeConstraintBase.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/CompositeConstraintBase.php index 7d6ab19..a5bdf84 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/CompositeConstraintBase.php +++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/CompositeConstraintBase.php @@ -7,7 +7,7 @@ /** * Provides a base class for constraints validating multiple fields. * - * The constraint must be defined on entity-level; i.e., added to the entity + * The constraint must be defined on entity-level; that is, added to the entity * type. * * @see \Drupal\Core\Entity\EntityType::addConstraint diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php index 0c54dc4..3684a6c 100644 --- a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php +++ b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php @@ -261,7 +261,7 @@ public function addField($field, $type, $langcode) { $next_index_prefix = $relationship_specifier; } $entity_type_id = NULL; - // Relationship specifier can also contain the entity type ID, i.e. + // Relationship specifier can also contain the entity type ID, that is // entity:node, entity:user or entity:taxonomy. if (strpos($relationship_specifier, ':') !== FALSE) { list($relationship_specifier, $entity_type_id) = explode(':', $relationship_specifier, 2); @@ -335,7 +335,7 @@ protected function ensureEntityTable($index_prefix, $property, $type, $langcode, if (isset($mapping[$property])) { // Ensure a table joined multiple times through different index prefixes // has unique entityTables entries by concatenating the index prefix - // and the base table alias. In this way i.e. if we join to the same + // and the base table alias. In this way that is if we join to the same // entity table several times for different entity reference fields, // each join gets a separate alias. $key = $index_prefix . ($base_table === 'base_table' ? $table : $base_table); diff --git a/core/lib/Drupal/Core/Entity/Schema/DynamicallyFieldableEntityStorageSchemaInterface.php b/core/lib/Drupal/Core/Entity/Schema/DynamicallyFieldableEntityStorageSchemaInterface.php index 807db45..a1db93d 100644 --- a/core/lib/Drupal/Core/Entity/Schema/DynamicallyFieldableEntityStorageSchemaInterface.php +++ b/core/lib/Drupal/Core/Entity/Schema/DynamicallyFieldableEntityStorageSchemaInterface.php @@ -45,10 +45,10 @@ public function requiresFieldStorageSchemaChanges(FieldStorageDefinitionInterfac * - There are existing entities, but none with existing values for this * field. * - There are existing field values, but the schema changes can be applied - * without losing them (e.g., if the schema changes can be performed by + * without losing them (for example, if the schema changes can be performed by * altering tables rather than dropping and recreating them). * - The only field values that would be lost are ones that are not valid for - * the new definition (e.g., if changing a field from revisionable to + * the new definition (for example, if changing a field from revisionable to * non-revisionable, then it's okay to drop data for the non-default * revision). * diff --git a/core/lib/Drupal/Core/Entity/Schema/EntityStorageSchemaInterface.php b/core/lib/Drupal/Core/Entity/Schema/EntityStorageSchemaInterface.php index 4feab7b..6cb041c 100644 --- a/core/lib/Drupal/Core/Entity/Schema/EntityStorageSchemaInterface.php +++ b/core/lib/Drupal/Core/Entity/Schema/EntityStorageSchemaInterface.php @@ -46,10 +46,10 @@ public function requiresEntityStorageSchemaChanges(EntityTypeInterface $entity_t * This function can return FALSE if any of these conditions apply: * - There are no existing entities for the entity type. * - There are existing entities, but the schema changes can be applied - * without losing their data (e.g., if the schema changes can be performed + * without losing their data (for example, if the schema changes can be performed * by altering tables rather than dropping and recreating them). * - The only entity data that would be lost are ones that are not valid for - * the new definition (e.g., if changing an entity type from revisionable + * the new definition (for example, if changing an entity type from revisionable * to non-revisionable, then it's okay to drop data for the non-default * revision). * diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php index 29b8a9a..7436949 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php @@ -31,7 +31,7 @@ * The class uses \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema * internally in order to automatically generate the database schema based on * the defined base fields. Entity types can override the schema handler to - * customize the generated schema; e.g., to add additional indexes. + * customize the generated schema; for example, to add additional indexes. * * @ingroup entity_api */ @@ -567,7 +567,7 @@ protected function loadFromSharedTables(array &$values, array &$translations, $l // \Drupal\Core\Entity\Sql\TableMappingInterface:: getColumNames() // returns an array keyed by property names so remove the keys // before array_merge() to avoid losing data with fields having the - // same columns i.e. value. + // same columns that is value. $column_names = array_merge($column_names, array_values($table_mapping->getColumnNames($data_field))); } $query->fields('data', $column_names); diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 3349ebd..0e04834 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -239,7 +239,7 @@ public function requiresFieldStorageSchemaChanges(FieldStorageDefinitionInterfac * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition * The field storage definition. The field that must not have custom - * storage, i.e. the storage must take care of storing the field. + * storage, that is the storage must take care of storing the field. * * @return array * The schema data. @@ -659,7 +659,7 @@ protected function checkEntityType(EntityTypeInterface $entity_type) { * * Entity types may override this method in order to optimize the generated * schema of the entity tables. However, only cross-field optimizations should - * be added here; e.g., an index spanning multiple fields. Optimizations that + * be added here; for example, an index spanning multiple fields. Optimizations that * apply to a single field have to be added via * SqlContentEntityStorageSchema::getSharedTableFieldSchema() instead. * @@ -1469,7 +1469,7 @@ protected function deleteSharedTableSchema(FieldStorageDefinitionInterface $stor * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition * The storage definition of the field being updated. * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $original - * The original storage definition; i.e., the definition before the update. + * The original storage definition; that is, the definition before the update. * * @throws \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException * Thrown when the update to the field is forbidden. @@ -1561,7 +1561,7 @@ protected function updateDedicatedTableSchema(FieldStorageDefinitionInterface $s * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition * The storage definition of the field being updated. * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $original - * The original storage definition; i.e., the definition before the update. + * The original storage definition; that is, the definition before the update. * * @throws \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException * Thrown when the update to the field is forbidden. @@ -1783,7 +1783,7 @@ protected function hasNullFieldPropertyData($table_name, $column_name) { * Entity types may override this method in order to optimize the generated * schema for given field. While all optimizations that apply to a single * field have to be added here, all cross-field optimizations should be via - * SqlContentEntityStorageSchema::getEntitySchema() instead; e.g., + * SqlContentEntityStorageSchema::getEntitySchema() instead; for example, * an index spanning multiple fields. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition @@ -1823,7 +1823,7 @@ protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $st if ($storage_definition_is_new && $storage_definition instanceof BaseFieldDefinition && $table_mapping->allowsSharedTableStorage($storage_definition)) { if (($initial_storage_value = $storage_definition->getInitialValue()) && !empty($initial_storage_value)) { // We only support initial values for fields that are stored in shared - // tables (i.e. single-value fields). + // tables (that is single-value fields). // @todo Implement initial value support for multi-value fields in // https://www.drupal.org/node/2883851. $initial_value = reset($initial_storage_value); diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchemaConverter.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchemaConverter.php index 2d3edfc..46d8ca3 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchemaConverter.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchemaConverter.php @@ -92,7 +92,7 @@ public function __construct($entity_type_id, EntityTypeManagerInterface $entity_ * * This process does the following tasks: * - creates the schema from scratch with the new revisionable entity type - * definition (i.e. the current definition of the entity type from code) + * definition (that is the current definition of the entity type from code) * using temporary table names; * - loads the initial entity data by using the last installed entity and * field storage definitions; diff --git a/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php b/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php index 31c3385..1bd579b 100644 --- a/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php +++ b/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php @@ -48,7 +48,7 @@ public function getAllColumns($table_name); * Gets a list of names for entity fields stored in the specified table. * * The return list is contains the entity field names, not database field - * (i.e. column) names. To get the mapping of specific entity field to + * (that is column) names. To get the mapping of specific entity field to * database columns use ::getColumnNames(). * * @param string $table_name diff --git a/core/lib/Drupal/Core/Entity/entity.api.php b/core/lib/Drupal/Core/Entity/entity.api.php index 2b893fd..d0931aa 100644 --- a/core/lib/Drupal/Core/Entity/entity.api.php +++ b/core/lib/Drupal/Core/Entity/entity.api.php @@ -845,7 +845,7 @@ function hook_entity_bundle_info_alter(&$bundles) { * This hook is invoked after the operation has been performed. * * @param string $entity_type_id - * The type of $entity; e.g. 'node' or 'user'. + * The type of $entity; for example 'node' or 'user'. * @param string $bundle * The name of the bundle. * @@ -921,7 +921,7 @@ function hook_ENTITY_TYPE_create(\Drupal\Core\Entity\EntityInterface $entity) { * @param \Drupal\Core\Entity\EntityInterface[] $entities * The entities keyed by entity ID. * @param string $entity_type_id - * The type of entities being loaded (i.e. node, user, comment). + * The type of entities being loaded (that is node, user, comment). * * @ingroup entity_crud * @see hook_ENTITY_TYPE_load() @@ -955,7 +955,7 @@ function hook_ENTITY_TYPE_load($entities) { * @param \Drupal\Core\Entity\EntityInterface[] $entities * The entities keyed by entity ID. * @param string $entity_type - * The type of entities being loaded (i.e. node, user, comment). + * The type of entities being loaded (that is node, user, comment). * * @see hook_entity_load() */ @@ -1427,7 +1427,7 @@ function hook_ENTITY_TYPE_view(array &$build, \Drupal\Core\Entity\EntityInterfac * If a module wishes to act on the rendered HTML of the entity rather than the * structured content array, it may use this hook to add a #post_render * callback. Alternatively, it could also implement hook_preprocess_HOOK() for - * the particular entity type template, if there is one (e.g., node.html.twig). + * the particular entity type template, if there is one (for example, node.html.twig). * * See the @link themeable Default theme implementations topic @endlink and * drupal_render() for details. @@ -1465,7 +1465,7 @@ function hook_entity_view_alter(array &$build, Drupal\Core\Entity\EntityInterfac * If a module wishes to act on the rendered HTML of the entity rather than the * structured content array, it may use this hook to add a #post_render * callback. Alternatively, it could also implement hook_preprocess_HOOK() for - * the particular entity type template, if there is one (e.g., node.html.twig). + * the particular entity type template, if there is one (for example, node.html.twig). * * See the @link themeable Default theme implementations topic @endlink and * drupal_render() for details. @@ -1501,7 +1501,7 @@ function hook_ENTITY_TYPE_view_alter(array &$build, Drupal\Core\Entity\EntityInt * is not appropriate, for example when attaching other 'entity' style objects. * * @param string $entity_type_id - * The type of entities being viewed (i.e. node, user, comment). + * The type of entities being viewed (that is node, user, comment). * @param array $entities * The entities keyed by entity ID. * @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface[] $displays @@ -1611,9 +1611,9 @@ function hook_entity_build_defaults_alter(array &$build, \Drupal\Core\Entity\Ent * components. * @param array $context * An associative array containing: - * - entity_type: The entity type, e.g., 'node' or 'user'. - * - bundle: The bundle, e.g., 'page' or 'article'. - * - view_mode: The view mode, e.g., 'full', 'teaser', etc. + * - entity_type: The entity type, for example, 'node' or 'user'. + * - bundle: The bundle, for example, 'page' or 'article'. + * - view_mode: The view mode, for example, 'full', 'teaser', etc. * * @ingroup entity_crud */ @@ -1720,9 +1720,9 @@ function hook_ENTITY_TYPE_prepare_form(\Drupal\Core\Entity\EntityInterface $enti * components. * @param array $context * An associative array containing: - * - entity_type: The entity type, e.g., 'node' or 'user'. - * - bundle: The bundle, e.g., 'page' or 'article'. - * - form_mode: The form mode; e.g., 'default', 'profile', 'register', etc. + * - entity_type: The entity type, for example, 'node' or 'user'. + * - bundle: The bundle, for example, 'page' or 'article'. + * - form_mode: The form mode; for example, 'default', 'profile', 'register', etc. * * @ingroup entity_crud */ @@ -2006,7 +2006,7 @@ function hook_entity_field_access_alter(array &$grants, array $context) { * Acts when initializing a fieldable entity object. * * This hook runs after a new entity object or a new entity translation object - * has just been instantiated. It can be used to set initial values, e.g. to + * has just been instantiated. It can be used to set initial values, for example to * provide defaults. * * @param \Drupal\Core\Entity\FieldableEntityInterface $entity @@ -2025,7 +2025,7 @@ function hook_entity_field_values_init(\Drupal\Core\Entity\FieldableEntityInterf * Acts when initializing a fieldable entity object. * * This hook runs after a new entity object or a new entity translation object - * has just been instantiated. It can be used to set initial values, e.g. to + * has just been instantiated. It can be used to set initial values, for example to * provide defaults. * * @param \Drupal\Core\Entity\FieldableEntityInterface $entity diff --git a/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php b/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php index ea8bff1..e55234e 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php +++ b/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php @@ -119,7 +119,7 @@ public function onResponse(FilterResponseEvent $event) { * The updated HTML markup. * * @todo Once a future version of PHP supports parsing HTML5 properly - * (i.e. doesn't fail on + * (that is doesn't fail on * https://www.drupal.org/comment/7938201#comment-7938201) then we can get * rid of this manual parsing and use DOMDocument instead. */ @@ -169,7 +169,7 @@ public static function setLinkActiveClass($html_markup, $current_path, $is_front } } - // Get the HTML: this will be the opening part of a single tag, e.g.: + // Get the HTML: this will be the opening part of a single tag, for example: // $tag = substr($html_markup, $pos_tag_start, $pos_tag_end - $pos_tag_start + 1); diff --git a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php index 701c433..0b86efe 100644 --- a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php @@ -76,7 +76,7 @@ public function onResponse(FilterResponseEvent $event) { // Since this affects the format of the output, it could be argued that // this should be implemented as a separate Accept MIME type. However, // that would require separate variants for each type of AJAX request - // (e.g., drupal-ajax, drupal-dialog, drupal-modal), so for expediency, + // (for example, drupal-ajax, drupal-dialog, drupal-modal), so for expediency, // this browser workaround is implemented via a GET or POST parameter. // // @see http://malsup.com/jquery/form/#file-upload diff --git a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php index be3f55e..7e73322 100644 --- a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php @@ -105,7 +105,7 @@ public function onKernelRequestFilterProvider(GetResponseEvent $event) { * Respond with a challenge on access denied exceptions if appropriate. * * On a 403 (access denied), if there are no credentials on the request, some - * authentication methods (e.g. basic auth) require that a challenge is sent + * authentication methods (for example basic auth) require that a challenge is sent * to the client. * * @param \Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event diff --git a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php index 8812583..7d53468 100644 --- a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php @@ -141,8 +141,8 @@ protected function makeSubrequest(GetResponseForExceptionEvent $event, $url, $st // result, the exception, et cetera) but override the routing information. // This means that aside from routing, this is identical to the master // request. This allows us to generate a response that is executed on - // behalf of the master request, i.e. for the original URL. This is what - // allows us to e.g. generate a 404 response for the original URL; if we + // behalf of the master request, that is for the original URL. This is what + // allows us to for example generate a 404 response for the original URL; if we // would execute a subrequest with the 404 route's URL, then it'd be // generated for *that* URL, not the *original* URL. $sub_request = clone $request; @@ -157,7 +157,7 @@ protected function makeSubrequest(GetResponseForExceptionEvent $event, $url, $st $sub_request->attributes->add($this->accessUnawareRouter->match($url)); // Add to query (GET) or request (POST) parameters: - // - 'destination' (to ensure e.g. the login form in a 403 response + // - 'destination' (to ensure for example the login form in a 403 response // redirects to the original URL) // - '_exception_statuscode' $parameters = $sub_request->isMethod('GET') ? $sub_request->query : $sub_request->request; diff --git a/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php index 75ea5fd..ea40a36 100644 --- a/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php @@ -123,7 +123,7 @@ protected function wrapControllerExecutionInRenderContext($controller, array $ar return call_user_func_array($controller, $arguments); }); - // If early rendering happened, i.e. if code in the controller called + // If early rendering happened, that is if code in the controller called // drupal_render() outside of a render context, then the bubbleable metadata // for that is stored in the current render context. if (!$context->isEmpty()) { diff --git a/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php index bca8f68..ff8bfa2 100644 --- a/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php @@ -15,7 +15,7 @@ * controllers and routes can't be expected to know what all possible entity * types might exist across all modules in order to pick names that don't * conflict. Instead, the 'type' should be determined from introspecting what - * kind of PHP variable (e.g., a type hinted interface) the controller + * kind of PHP variable (for example, a type hinted interface) the controller * requires: https://www.drupal.org/node/2041907. */ class EntityRouteAlterSubscriber implements EventSubscriberInterface { diff --git a/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php index 9b974f2..fd83065 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php @@ -41,7 +41,7 @@ public function __construct(Connection $connection) { public function onException(GetResponseForExceptionEvent $event) { $exception = $event->getException(); if ($this->shouldRedirectToInstaller($exception, $this->connection)) { - // Only redirect if this is an HTML response (i.e., a user trying to view + // Only redirect if this is an HTML response (that is, a user trying to view // the site in a web browser before installing it). $request = $event->getRequest(); $format = $request->query->get(MainContentViewSubscriber::WRAPPER_FORMAT, $request->getRequestFormat()); diff --git a/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php b/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php index d9ece46..a962257 100644 --- a/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php @@ -12,8 +12,8 @@ * HTML response subscriber to allow for different placeholder strategies. * * This allows core and contrib to coordinate how to render placeholders; - * e.g. an EsiRenderStrategy could replace the placeholders with ESI tags, - * while e.g. a BigPipeRenderStrategy could store the placeholders in a + * for example an EsiRenderStrategy could replace the placeholders with ESI tags, + * while for example a BigPipeRenderStrategy could store the placeholders in a * BigPipe service and render them after the main content has been sent to * the client. */ diff --git a/core/lib/Drupal/Core/Executable/ExecutableManagerInterface.php b/core/lib/Drupal/Core/Executable/ExecutableManagerInterface.php index c1d74bc..7478853 100644 --- a/core/lib/Drupal/Core/Executable/ExecutableManagerInterface.php +++ b/core/lib/Drupal/Core/Executable/ExecutableManagerInterface.php @@ -16,7 +16,7 @@ * An executable plugin instance managed by the implementing manager. * * @return mixed - * The returned data varies by plugin implementation, e.g. conditions return + * The returned data varies by plugin implementation, for example conditions return * the boolean evaluation result. * * @throws \Drupal\Core\Executable\ExecutableException diff --git a/core/lib/Drupal/Core/Extension/Discovery/RecursiveExtensionFilterIterator.php b/core/lib/Drupal/Core/Extension/Discovery/RecursiveExtensionFilterIterator.php index ac69f01..3e95037 100644 --- a/core/lib/Drupal/Core/Extension/Discovery/RecursiveExtensionFilterIterator.php +++ b/core/lib/Drupal/Core/Extension/Discovery/RecursiveExtensionFilterIterator.php @@ -48,7 +48,7 @@ class RecursiveExtensionFilterIterator extends \RecursiveFilterIterator { * List of directory names to skip when recursing. * * These directories are globally ignored in the recursive filesystem scan; - * i.e., extensions (of all types) are not able to use any of these names, + * that is, extensions (of all types) are not able to use any of these names, * because their directory names will be skipped. * * @var array diff --git a/core/lib/Drupal/Core/Extension/Extension.php b/core/lib/Drupal/Core/Extension/Extension.php index 7cb6b56..5b0f53b 100644 --- a/core/lib/Drupal/Core/Extension/Extension.php +++ b/core/lib/Drupal/Core/Extension/Extension.php @@ -8,21 +8,21 @@ class Extension implements \Serializable { /** - * The type of the extension (e.g., 'module'). + * The type of the extension (for example, 'module'). * * @var string */ protected $type; /** - * The relative pathname of the extension (e.g., 'core/modules/node/node.info.yml'). + * The relative pathname of the extension (for example, 'core/modules/node/node.info.yml'). * * @var string */ protected $pathname; /** - * The filename of the main extension file (e.g., 'node.module'). + * The filename of the main extension file (for example, 'node.module'). * * @var string|null */ @@ -50,12 +50,12 @@ class Extension implements \Serializable { * @param string $root * The app root. * @param string $type - * The type of the extension; e.g., 'module'. + * The type of the extension; for example, 'module'. * @param string $pathname - * The relative path and filename of the extension's info file; e.g., + * The relative path and filename of the extension's info file; for example, * 'core/modules/node/node.info.yml'. * @param string $filename - * (optional) The filename of the main extension file; e.g., 'node.module'. + * (optional) The filename of the main extension file; for example, 'node.module'. */ public function __construct($root, $type, $pathname, $filename = NULL) { $this->root = $root; @@ -146,7 +146,7 @@ public function load() { /** * Re-routes method calls to SplFileInfo. * - * Offers all SplFileInfo methods to consumers; e.g., $extension->getMTime(). + * Offers all SplFileInfo methods to consumers; for example, $extension->getMTime(). */ public function __call($method, array $args) { if (!isset($this->splFileInfo)) { diff --git a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php index 17c0e5b..b4bb130 100644 --- a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php +++ b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php @@ -122,11 +122,11 @@ public function __construct($root, $use_file_cache = TRUE, $profile_directories * @endcode * * The following directories will be searched (in the order stated): - * - the core directory; i.e., /core - * - the installation profile directory; e.g., /core/profiles/standard - * - the legacy site-wide directory; i.e., /sites/all - * - the site-wide directory; i.e., / - * - the site-specific directory; e.g., /sites/example.com + * - the core directory; that is, /core + * - the installation profile directory; for example, /core/profiles/standard + * - the legacy site-wide directory; that is, /sites/all + * - the site-wide directory; that is, / + * - the site-specific directory; for example, /sites/example.com * * To also find test modules, add * @code diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php index 2a2113f..e1701b1 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandler.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php @@ -205,9 +205,9 @@ public function addProfile($name, $path) { * @param string $type * The extension type; either 'module' or 'profile'. * @param string $name - * The module name; e.g., 'node'. + * The module name; for example, 'node'. * @param string $path - * The module path; e.g., 'core/modules/node'. + * The module path; for example, 'core/modules/node'. */ protected function add($type, $name, $path) { $pathname = "$path/$name.info.yml"; @@ -566,7 +566,7 @@ public function alterDeprecated($description, $type, &$data, &$context1 = NULL, * Provides information about modules' implementations of a hook. * * @param string $hook - * The name of the hook (e.g. "help" or "menu"). + * The name of the hook (for example "help" or "menu"). * * @return mixed[] * An array whose keys are the names of the modules which are implementing @@ -606,7 +606,7 @@ protected function getImplementationInfo($hook) { * Builds hook implementation information for a given hook name. * * @param string $hook - * The name of the hook (e.g. "help" or "menu"). + * The name of the hook (for example "help" or "menu"). * * @return mixed[] * An array whose keys are the names of the modules which are implementing @@ -707,7 +707,7 @@ protected function verifyImplementations(&$implementations, $hook) { * * @return * An associative array with three keys: - * - 'name' includes the name of the thing to depend on (e.g. 'foo'). + * - 'name' includes the name of the thing to depend on (for example 'foo'). * - 'original_version' contains the original version string (which can be * used in the UI for reporting incompatibilities). * - 'versions' is a list of associative arrays, each containing the keys @@ -741,7 +741,7 @@ public static function parseDependency($dependency) { $op = !empty($matches['operation']) ? $matches['operation'] : '='; if ($matches['minor'] == 'x') { // Drupal considers "2.x" to mean any version that begins with - // "2" (e.g. 2.0, 2.9 are all "2.x"). PHP's version_compare(), + // "2" (for example 2.0, 2.9 are all "2.x"). PHP's version_compare(), // on the other hand, treats "x" as a string; so to // version_compare(), "2.x" is considered less than 2.0. This // means that >=2.x and <2.x are handled by version_compare() diff --git a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php index f1097e3..011f3ea 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php @@ -79,9 +79,9 @@ public function setModuleList(array $module_list = []); * Adds a module to the list of currently active modules. * * @param string $name - * The module name; e.g., 'node'. + * The module name; for example, 'node'. * @param string $path - * The module path; e.g., 'core/modules/node'. + * The module path; for example, 'core/modules/node'. */ public function addModule($name, $path); @@ -89,9 +89,9 @@ public function addModule($name, $path); * Adds an installation profile to the list of currently active modules. * * @param string $name - * The profile name; e.g., 'standard'. + * The profile name; for example, 'standard'. * @param string $path - * The profile path; e.g., 'core/profiles/standard'. + * The profile path; for example, 'core/profiles/standard'. */ public function addProfile($name, $path); @@ -132,7 +132,7 @@ public function moduleExists($module); * The include file's type (file extension). * @param string $name * (optional) The base file name (without the $type extension). If omitted, - * each module's name is used; i.e., "$module.$type" by default. + * each module's name is used; that is, "$module.$type" by default. */ public function loadAllIncludes($type, $name = NULL); @@ -153,7 +153,7 @@ public function loadAllIncludes($type, $name = NULL); * The include file's type (file extension). * @param string $name * (optional) The base file name (without the $type extension). If omitted, - * $module is used; i.e., resulting in "$module.$type" by default. + * $module is used; that is, resulting in "$module.$type" by default. * * @return string|false * The name of the included file, if successful; FALSE otherwise. @@ -176,7 +176,7 @@ public function getHookInfo(); * Determines which modules are implementing a hook. * * @param string $hook - * The name of the hook (e.g. "help" or "menu"). + * The name of the hook (for example "help" or "menu"). * * @return array * An array with the names of the modules which are implementing this hook. @@ -199,7 +199,7 @@ public function resetImplementations(); * @param string $module * The name of the module (without the .module extension). * @param string $hook - * The name of the hook (e.g. "help" or "menu"). + * The name of the hook (for example "help" or "menu"). * * @return bool * TRUE if the module is both installed and enabled, and the hook is diff --git a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php index a82be6a..ea1bd07 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php @@ -63,8 +63,8 @@ public function uninstall(array $theme_list); * - status: 1 for installed, 0 for uninstalled themes. * - info: The contents of the .info.yml file. * - stylesheets: A two dimensional array, using the first key for the - * media attribute (e.g. 'all'), the second for the name of the file - * (e.g. style.css). The value is a complete filepath (e.g. + * media attribute (for example 'all'), the second for the name of the file + * (for example style.css). The value is a complete filepath (for example * themes/bartik/style.css). Not set if no stylesheets are defined in the * .info.yml file. * - scripts: An associative array of JavaScripts, using the filename as key diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index 45355cc..6c07f97 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -915,7 +915,7 @@ function hook_updater_info_alter(&$updaters) { * is suggested to use the module short name as a prefix) and the values are * themselves associative arrays with the following elements: * - title: The name of the requirement. - * - value: The current value (e.g., version, time, level, etc). During + * - value: The current value (for example, version, time, level, etc). During * install phase, this should only be used for version numbers, do not set * it if not applicable. * - description: The description of the requirement/status. diff --git a/core/lib/Drupal/Core/Field/Annotation/FieldType.php b/core/lib/Drupal/Core/Field/Annotation/FieldType.php index 8bf54cb..cde437f 100644 --- a/core/lib/Drupal/Core/Field/Annotation/FieldType.php +++ b/core/lib/Drupal/Core/Field/Annotation/FieldType.php @@ -60,7 +60,7 @@ class FieldType extends DataType { /** * The plugin_id of the default widget for this field type. * - * This widget must be available whenever the field type is available (i.e. + * This widget must be available whenever the field type is available (that is * provided by the field type module, or by a module the field type module * depends on). * @@ -71,7 +71,7 @@ class FieldType extends DataType { /** * The plugin_id of the default formatter for this field type. * - * This formatter must be available whenever the field type is available (i.e. + * This formatter must be available whenever the field type is available (that is * provided by the field type module, or by a module the field type module * depends on). * diff --git a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php index 4a8e4fa..71a231f 100644 --- a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php +++ b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php @@ -71,7 +71,7 @@ public static function create($type) { * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field - * definition in places where a full field definition is required; e.g., with + * definition in places where a full field definition is required; for example, with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition @@ -340,10 +340,10 @@ public function setPropertyConstraints($name, array $constraints) { /** * Adds constraints for a given field item property. * - * Adds a constraint to a property of a base field item. e.g. + * Adds a constraint to a property of a base field item. for example * @code * // Limit the field item's value property to the range 0 through 10. - * // e.g. $node->size->value. + * // for example $node->size->value. * $field->addPropertyConstraints('value', [ * 'Range' => [ * 'min' => 0, @@ -415,7 +415,7 @@ public function setDisplayOptions($display_context, array $options) { * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable - * Whether the display options can be configured (e.g., via the "Manage + * Whether the display options can be configured (for example, via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * diff --git a/core/lib/Drupal/Core/Field/FieldConfigBase.php b/core/lib/Drupal/Core/Field/FieldConfigBase.php index a32ff42..20bc155 100644 --- a/core/lib/Drupal/Core/Field/FieldConfigBase.php +++ b/core/lib/Drupal/Core/Field/FieldConfigBase.php @@ -117,7 +117,7 @@ * The default value is used when an entity is created, either: * - through an entity creation form; the form elements for the field are * prepopulated with the default value. - * - through direct API calls (i.e. $entity->save()); the default value is + * - through direct API calls (that is $entity->save()); the default value is * added if the $entity object provides no explicit entry (actual values or * "the field is empty") for the field. * @@ -269,7 +269,7 @@ public function onDependencyRemoval(array $dependencies) { */ public function postCreate(EntityStorageInterface $storage) { parent::postCreate($storage); - // If it was not present in the $values passed to create(), (e.g. for + // If it was not present in the $values passed to create(), (for example for // programmatic creation), populate the denormalized field_type property // from the field storage, so that it gets saved in the config record. if (empty($this->field_type)) { diff --git a/core/lib/Drupal/Core/Field/FieldConfigInterface.php b/core/lib/Drupal/Core/Field/FieldConfigInterface.php index d8b055a..4add16f 100644 --- a/core/lib/Drupal/Core/Field/FieldConfigInterface.php +++ b/core/lib/Drupal/Core/Field/FieldConfigInterface.php @@ -176,10 +176,10 @@ public function setPropertyConstraints($name, array $constraints); /** * Adds constraints for a given field item property. * - * Adds a constraint to a property of a field item. e.g. + * Adds a constraint to a property of a field item. for example * @code * // Limit the field item's value property to the range 0 through 10. - * // e.g. $node->field_how_many->value. + * // for example $node->field_how_many->value. * $field->addPropertyConstraints('value', [ * 'Range' => [ * 'min' => 0, @@ -220,7 +220,7 @@ public function addPropertyConstraints($name, array $constraints); * instead. * @code * // Add a constraint to the 'field_username' FieldItemList. - * // e.g. $node->field_username + * // for example $node->field_username * $fields['field_username']->addConstraint('UniqueField'); * @endcode * @@ -241,7 +241,7 @@ public function addPropertyConstraints($name, array $constraints); * hook_entity_bundle_field_info_alter(). * * @param string $constraint_name - * The name of the constraint to add, i.e. its plugin id. + * The name of the constraint to add, that is its plugin id. * @param array|null $options * The constraint options as required by the constraint plugin, or NULL. * diff --git a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php index c99a11a..658654a 100644 --- a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php +++ b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php @@ -15,7 +15,7 @@ * are different field objects. * * In contrast, an entity field *definition* is an object that returns - * information *about* a field (e.g., its type and settings) rather than its + * information *about* a field (for example, its type and settings) rather than its * values. As such, if all the information about $node_1->body and $node_2->body * is the same, then the same field definition object can be used to describe * both. @@ -38,10 +38,10 @@ * different objects based on the class \Drupal\Core\Field\BaseFieldDefinition, * which implements this interface as well. * - * Field definitions may fully define a concrete data object (e.g., + * Field definitions may fully define a concrete data object (for example, * $node_1->body), or may provide a best-guess definition for a data object that * might come into existence later. For example, $node_1->body and $node_2->body - * may have different definitions (e.g., if the node types are different). When + * may have different definitions (for example, if the node types are different). When * adding the "body" field to a View that can return nodes of different types, * the View can get a field definition that represents the "body" field * abstractly, and present Views configuration options to the administrator @@ -65,7 +65,7 @@ public function getName(); * Returns the field type. * * @return string - * The field type, i.e. the id of a field type plugin. For example 'text'. + * The field type, that is the id of a field type plugin. For example 'text'. * * @see \Drupal\Core\Field\FieldTypePluginManagerInterface */ @@ -101,7 +101,7 @@ public function getTargetEntityTypeId(); * bundles). * * @return string|null - * The bundle the field is defined for, or NULL if it is a base field; i.e., + * The bundle the field is defined for, or NULL if it is a base field; that is, * it is not bundle-specific. */ public function getTargetBundle(); diff --git a/core/lib/Drupal/Core/Field/FieldDefinitionListenerInterface.php b/core/lib/Drupal/Core/Field/FieldDefinitionListenerInterface.php index a1c7c82..2ca29f2 100644 --- a/core/lib/Drupal/Core/Field/FieldDefinitionListenerInterface.php +++ b/core/lib/Drupal/Core/Field/FieldDefinitionListenerInterface.php @@ -21,7 +21,7 @@ public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definiti * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition being updated. * @param \Drupal\Core\Field\FieldDefinitionInterface $original - * The original field definition; i.e., the definition before the update. + * The original field definition; that is, the definition before the update. */ public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original); diff --git a/core/lib/Drupal/Core/Field/FieldItemInterface.php b/core/lib/Drupal/Core/Field/FieldItemInterface.php index f23395c..4db6556 100644 --- a/core/lib/Drupal/Core/Field/FieldItemInterface.php +++ b/core/lib/Drupal/Core/Field/FieldItemInterface.php @@ -8,7 +8,7 @@ /** * Interface for entity field items. * - * Entity field items are typed data objects containing the field values, i.e. + * Entity field items are typed data objects containing the field values, that is * implementing the ComplexDataInterface. * * When implementing this interface which extends Traversable, make sure to list @@ -37,7 +37,7 @@ public static function propertyDefinitions(FieldStorageDefinitionInterface $fiel /** * Returns the name of the main property, if any. * - * Some field items consist mainly of one main property, e.g. the value of a + * Some field items consist mainly of one main property, for example the value of a * text field or the @code target_id @endcode of an entity reference. If the * field item has no main property, the method returns NULL. * @@ -115,7 +115,7 @@ public function getFieldDefinition(); * Magic method: Gets a property value. * * @param string $property_name - * The name of the property to get; e.g., 'title' or 'name'. + * The name of the property to get; for example, 'title' or 'name'. * * @return mixed * The property value. @@ -129,7 +129,7 @@ public function __get($property_name); * Magic method: Sets a property value. * * @param string $property_name - * The name of the property to set; e.g., 'title' or 'name'. + * The name of the property to set; for example, 'title' or 'name'. * @param mixed $value * The value to set, or NULL to unset the property. Optionally, a typed * data object implementing Drupal\Core\TypedData\TypedDataInterface may be @@ -144,7 +144,7 @@ public function __set($property_name, $value); * Magic method: Determines whether a property is set. * * @param string $property_name - * The name of the property to get; e.g., 'title' or 'name'. + * The name of the property to get; for example, 'title' or 'name'. * * @return bool * Returns TRUE if the property exists and is set, FALSE otherwise. @@ -155,7 +155,7 @@ public function __isset($property_name); * Magic method: Unsets a property. * * @param string $property_name - * The name of the property to get; e.g., 'title' or 'name'. + * The name of the property to get; for example, 'title' or 'name'. */ public function __unset($property_name); @@ -277,7 +277,7 @@ public static function defaultFieldSettings(); * An example of a conversion between representations might be an * "allowed_values" setting that's structured by the field type as a * \Drupal\Core\TypedData\OptionsProviderInterface::getPossibleOptions() - * result (i.e., values as keys and labels as values). For such a use case, + * result (that is, values as keys and labels as values). For such a use case, * in order to comply with the above, this method could convert that * representation to a numerically indexed array whose values are sub-arrays * with the schema definable keys of "value" and "label". diff --git a/core/lib/Drupal/Core/Field/FieldItemListInterface.php b/core/lib/Drupal/Core/Field/FieldItemListInterface.php index c350432..839b5d2 100644 --- a/core/lib/Drupal/Core/Field/FieldItemListInterface.php +++ b/core/lib/Drupal/Core/Field/FieldItemListInterface.php @@ -244,7 +244,7 @@ public function defaultValuesFormSubmit(array $element, array &$form, FormStateI * Processes the default value before being applied. * * Defined or configured default values of a field might need some processing - * in order to be a valid runtime value for the field type; e.g., a date field + * in order to be a valid runtime value for the field type; for example, a date field * could process the defined value of 'NOW' to a valid date. * * @param array $default_value diff --git a/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php index d3711f7..50d0581 100644 --- a/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php +++ b/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php @@ -14,10 +14,10 @@ * bundle fields have to share the same common field storage definition. Thus, * the storage definitions can be defined by entity type only. * The bundle fields corresponding to a field storage definition may provide - * additional information; e.g., they may provide bundle-specific settings or + * additional information; for example, they may provide bundle-specific settings or * constraints that are not present in the storage definition. However bundle * fields may not override or alter any information provided by the storage - * definition except for the label and the description; e.g., any constraints + * definition except for the label and the description; for example, any constraints * and settings on the storage definition must be present on the bundle field as * well. * @@ -45,7 +45,7 @@ public function getName(); * Returns the field type. * * @return string - * The field type, i.e. the id of a field type plugin. For example 'text'. + * The field type, that is the id of a field type plugin. For example 'text'. * * @see \Drupal\Core\Field\FieldTypePluginManagerInterface */ @@ -146,7 +146,7 @@ public function getDescription(); * Gets an options provider for the given field item property. * * @param string $property_name - * The name of the property to get options for; e.g., 'value'. + * The name of the property to get options for; for example, 'value'. * @param \Drupal\Core\Entity\FieldableEntityInterface $entity * The entity for which the options should be provided. * @@ -213,7 +213,7 @@ public function getPropertyNames(); /** * Returns the name of the main property, if any. * - * Some field items consist mainly of one main property, e.g. the value of a + * Some field items consist mainly of one main property, for example the value of a * text field or the @code target_id @endcode of an entity reference. If the * field item has no main property, the method returns NULL. * @@ -294,7 +294,7 @@ public function getConstraints(); * details. * * @param string $constraint_name - * The name of the constraint, i.e. its plugin id. + * The name of the constraint, that is its plugin id. * * @return array * A validation constraint definition which can be used for instantiating a @@ -308,7 +308,7 @@ public function getConstraint($constraint_name); * Returns the name of the provider of this field. * * @return string - * The provider name; e.g., the module name. + * The provider name; for example, the module name. */ public function getProvider(); @@ -316,7 +316,7 @@ public function getProvider(); * Returns the storage behavior for this field. * * Indicates whether the entity type's storage should take care of storing the - * field values or whether it is handled separately; e.g. by the + * field values or whether it is handled separately; for example by the * module providing the field. * * @return bool diff --git a/core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php b/core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php index abb25c4..0f654f8 100644 --- a/core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php +++ b/core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php @@ -21,7 +21,7 @@ public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $ * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition * The field being updated. * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $original - * The original storage definition; i.e., the definition before the update. + * The original storage definition; that is, the definition before the update. * * @throws \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException * Thrown when the update to the field is forbidden. diff --git a/core/lib/Drupal/Core/Field/FieldTypePluginManager.php b/core/lib/Drupal/Core/Field/FieldTypePluginManager.php index 565fa4e..48ce147 100644 --- a/core/lib/Drupal/Core/Field/FieldTypePluginManager.php +++ b/core/lib/Drupal/Core/Field/FieldTypePluginManager.php @@ -54,8 +54,8 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac * @param string $field_type * The field type, for which a field item should be created. * @param array $configuration - * The plugin configuration array, i.e. an array with the following keys: - * - field_definition: The field definition object, i.e. an instance of + * The plugin configuration array, that is an array with the following keys: + * - field_definition: The field definition object, that is an instance of * Drupal\Core\Field\FieldDefinitionInterface. * * @return \Drupal\Core\Field\FieldItemInterface diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 3d839c2..f1cf0c1 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -357,8 +357,8 @@ public function fieldSettingsForm(array $form, FormStateInterface $form_state) { $selection_plugins = \Drupal::service('plugin.manager.entity_reference_selection')->getSelectionGroups($this->getSetting('target_type')); $handlers_options = []; foreach (array_keys($selection_plugins) as $selection_group_id) { - // We only display base plugins (e.g. 'default', 'views', ...) and not - // entity type specific plugins (e.g. 'default:node', 'default:user', + // We only display base plugins (for example 'default', 'views', ...) and not + // entity type specific plugins (for example 'default:node', 'default:user', // ...). if (array_key_exists($selection_group_id, $selection_plugins[$selection_group_id])) { $handlers_options[$selection_group_id] = Html::escape($selection_plugins[$selection_group_id][$selection_group_id]['label']); @@ -629,7 +629,7 @@ public static function fieldSettingsAjaxProcessElement(&$element, $main_form) { /** * Render API callback: Moves entity_reference specific Form API elements - * (i.e. 'handler_settings') up a level for easier processing by the + * (that is 'handler_settings') up a level for easier processing by the * validation and submission handlers. * * @see _entity_reference_field_settings_process() diff --git a/core/lib/Drupal/Core/Field/WidgetBaseInterface.php b/core/lib/Drupal/Core/Field/WidgetBaseInterface.php index 83d160a..8e0137b 100644 --- a/core/lib/Drupal/Core/Field/WidgetBaseInterface.php +++ b/core/lib/Drupal/Core/Field/WidgetBaseInterface.php @@ -18,7 +18,7 @@ /** * Creates a form element for a field. * - * If the entity associated with the form is new (i.e., $entity->isNew() is + * If the entity associated with the form is new (that is, $entity->isNew() is * TRUE), the 'default value', if any, is pre-populated. Also allows other * modules to alter the form element by implementing their own hooks. * diff --git a/core/lib/Drupal/Core/File/FileSystemInterface.php b/core/lib/Drupal/Core/File/FileSystemInterface.php index 6682f46..cbcab91 100644 --- a/core/lib/Drupal/Core/File/FileSystemInterface.php +++ b/core/lib/Drupal/Core/File/FileSystemInterface.php @@ -36,8 +36,8 @@ public function moveUploadedFile($filename, $uri); * file_chmod_file settings for the default modes for directories * and uploaded/generated files. By default these will give everyone read * access so that users accessing the files with a user account without the - * webserver group (e.g. via FTP) can read these files, and give group write - * permissions so webserver group members (e.g. a vhost account) can alter + * webserver group (for example via FTP) can read these files, and give group write + * permissions so webserver group members (for example a vhost account) can alter * files uploaded and owned by the webserver. * * PHP's chmod does not support stream wrappers so we use our wrapper @@ -208,7 +208,7 @@ public function rmdir($uri, $context = NULL); public function tempnam($directory, $prefix); /** - * Returns the scheme of a URI (e.g. a stream). + * Returns the scheme of a URI (for example a stream). * * @param string $uri * A stream, referenced as "scheme://target" or "data:target". diff --git a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php index 3f8fd6d..3454cc1 100644 --- a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php +++ b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php @@ -252,7 +252,7 @@ protected function getFiletransfer($backend, $settings = []) { * Generates the Form API array for a given connection backend's settings. * * @param string $backend - * The name of the backend (e.g. 'ftp', 'ssh', etc). + * The name of the backend (for example 'ftp', 'ssh', etc). * * @return array * Form API array of connection settings for the given backend. diff --git a/core/lib/Drupal/Core/Flood/DatabaseBackend.php b/core/lib/Drupal/Core/Flood/DatabaseBackend.php index cb1fc92..a3a6efd 100644 --- a/core/lib/Drupal/Core/Flood/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Flood/DatabaseBackend.php @@ -198,7 +198,7 @@ public function schemaDefinition() { 'not null' => TRUE, ], 'event' => [ - 'description' => 'Name of event (e.g. contact).', + 'description' => 'Name of event (for example contact).', 'type' => 'varchar_ascii', 'length' => 64, 'not null' => TRUE, diff --git a/core/lib/Drupal/Core/Flood/FloodInterface.php b/core/lib/Drupal/Core/Flood/FloodInterface.php index 5e3ead3..d98c1ca 100644 --- a/core/lib/Drupal/Core/Flood/FloodInterface.php +++ b/core/lib/Drupal/Core/Flood/FloodInterface.php @@ -13,7 +13,7 @@ * @param string $name * The name of an event. To prevent unintended name clashes, it is recommended * to use the module name first in the event name, optionally followed by - * a dot and the actual event name (e.g. "mymodule.my_event"). + * a dot and the actual event name (for example "mymodule.my_event"). * @param int $window * (optional) Number of seconds before this event expires. Defaults to 3600 * (1 hour). Typically uses the same value as the isAllowed() $window diff --git a/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php b/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php index 0e49c5b..8475f47 100644 --- a/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php +++ b/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php @@ -52,7 +52,7 @@ public function __construct(FormAjaxResponseBuilderInterface $form_ajax_response public function onView(GetResponseForControllerResultEvent $event) { // To support an AJAX form submission of a form within a block, make the // later VIEW subscribers process the controller result as though for - // HTML display (i.e., add blocks). During that block building, when the + // HTML display (that is, add blocks). During that block building, when the // submitted form gets processed, an exception gets thrown by // \Drupal\Core\Form\FormBuilderInterface::buildForm(), allowing // self::onException() to return an AJAX response instead of an HTML one. diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index be000dc..004e5e3 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -379,7 +379,7 @@ public function rebuildForm($form_id, FormStateInterface &$form_state, $old_form $form_state->setCached(); } - // If only parts of the form will be returned to the browser (e.g., Ajax or + // If only parts of the form will be returned to the browser (for example, Ajax or // RIA clients), or if the form already had a new build ID regenerated when // it was retrieved from the form cache, reuse the existing #build_id. // Otherwise, a new #build_id is generated, to not clobber the previous @@ -604,7 +604,7 @@ public function processForm($form_id, &$form, FormStateInterface &$form_state) { // the changes made to $form_state during this request. Normally, a submit // handler sets $form_state->isRebuilding() if a fully executed form // requires another step. However, for forms that have not been fully - // executed (e.g., Ajax submissions triggered by non-buttons), there is no + // executed (for example, Ajax submissions triggered by non-buttons), there is no // submit handler to set $form_state->isRebuilding(). It would not make // sense to redisplay the identical form without an error for the user to // correct, so we also rebuild error-free non-executed forms, regardless @@ -614,7 +614,7 @@ public function processForm($form_id, &$form, FormStateInterface &$form_state) { // have divergent form execution based on whether the triggering element // has #executes_submit_callback set to TRUE. if (($form_state->isRebuilding() || !$form_state->isExecuted()) && !FormState::hasAnyErrors()) { - // Form building functions (e.g., self::handleInputElement()) may use + // Form building functions (for example, self::handleInputElement()) may use // $form_state->isRebuilding() to determine if they are running in the // context of a rebuild, so ensure it is set. $form_state->setRebuild(); @@ -985,7 +985,7 @@ public function doBuildForm($form_id, &$element, FormStateInterface &$form_state if (!empty($element['#input'])) { $this->handleInputElement($form_id, $element, $form_state); } - // Allow for elements to expand to multiple elements, e.g., radios, + // Allow for elements to expand to multiple elements, for example, radios, // checkboxes and files. if (isset($element['#process']) && !$element['#processed']) { foreach ($element['#process'] as $callback) { diff --git a/core/lib/Drupal/Core/Form/FormBuilderInterface.php b/core/lib/Drupal/Core/Form/FormBuilderInterface.php index ca79437..40733aa 100644 --- a/core/lib/Drupal/Core/Form/FormBuilderInterface.php +++ b/core/lib/Drupal/Core/Form/FormBuilderInterface.php @@ -39,7 +39,7 @@ public function getFormId($form_arg, FormStateInterface &$form_state); * Gets a renderable form array. * * This function should be used instead of self::buildForm() when $form_state - * is not needed (i.e., when initially rendering the form) and is often + * is not needed (that is, when initially rendering the form) and is often * used as a menu callback. * * @param \Drupal\Core\Form\FormInterface|string $form_arg diff --git a/core/lib/Drupal/Core/Form/FormState.php b/core/lib/Drupal/Core/Form/FormState.php index 5585a76..c7d1bfb 100644 --- a/core/lib/Drupal/Core/Form/FormState.php +++ b/core/lib/Drupal/Core/Form/FormState.php @@ -116,7 +116,7 @@ class FormState implements FormStateInterface { /** * Used when a form needs to return some kind of a - * \Symfony\Component\HttpFoundation\Response object, e.g., a + * \Symfony\Component\HttpFoundation\Response object, for example, a * \Symfony\Component\HttpFoundation\BinaryFileResponse when triggering a * file download. If you use self::setRedirect() or self::setRedirectUrl(), * it will be used to build a @@ -387,7 +387,7 @@ class FormState implements FormStateInterface { * sequence. Form API provides this key for modules to communicate information * across form-related functions during a single page request. It may be used * to temporarily save data that does not need to or should not be cached - * during the whole form workflow; e.g., data that needs to be accessed during + * during the whole form workflow; for example, data that needs to be accessed during * the current form build process only. There is no use-case for this * functionality in Drupal core. * diff --git a/core/lib/Drupal/Core/Form/FormStateInterface.php b/core/lib/Drupal/Core/Form/FormStateInterface.php index 9a69764..911ad9e 100644 --- a/core/lib/Drupal/Core/Form/FormStateInterface.php +++ b/core/lib/Drupal/Core/Form/FormStateInterface.php @@ -61,7 +61,7 @@ public function setCompleteForm(array &$complete_form); * The include file's type (file extension). * @param string|null $name * (optional) The base file name (without the $type extension). If omitted, - * $module is used; i.e., resulting in "$module.$type" by default. + * $module is used; that is, resulting in "$module.$type" by default. * * @return string|false * The filepath of the loaded include file, or FALSE if the include file was @@ -431,7 +431,7 @@ public static function hasAnyErrors(); * The #limit_validation_errors property is a list of "sections" within * $form_state->getValues() that must contain valid values. Each "section" is * an array with the ordered set of keys needed to reach that part of - * $form_state->getValues() (i.e., the #parents property of the element). + * $form_state->getValues() (that is, the #parents property of the element). * * Example 1: Allow the "Previous" button to function, regardless of whether * any user input is valid. @@ -654,7 +654,7 @@ public function getButtons(); * * @throws \LogicException * If the current request is using an HTTP method that must not change - * state (e.g., GET). + * state (for example, GET). */ public function setCached($cache = TRUE); diff --git a/core/lib/Drupal/Core/Image/ImageFactory.php b/core/lib/Drupal/Core/Image/ImageFactory.php index bd4614e..e818746 100644 --- a/core/lib/Drupal/Core/Image/ImageFactory.php +++ b/core/lib/Drupal/Core/Image/ImageFactory.php @@ -93,7 +93,7 @@ public function get($source = NULL, $toolkit_id = NULL) { * to use the current toolkit. * * @return array - * An array of supported image file extensions (e.g. png/jpeg/gif). + * An array of supported image file extensions (for example png/jpeg/gif). * * @see \Drupal\Core\ImageToolkit\ImageToolkitInterface::getSupportedExtensions() */ diff --git a/core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php b/core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php index 96ebe9e..941aaa6 100644 --- a/core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php +++ b/core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php @@ -54,7 +54,7 @@ class ImageToolkitOperation extends Plugin { public $toolkit; /** - * The machine name of the image toolkit operation implemented (e.g. "crop"). + * The machine name of the image toolkit operation implemented (for example "crop"). * * @var string */ diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php index 51867f4..11c0d64 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php @@ -133,7 +133,7 @@ public function getMimeType(); * An associative requirements array as is returned by hook_requirements(). * If the toolkit claims no requirements to the system, returns an empty * array. The array can have arbitrary keys and they do not have to be - * prefixed by e.g. the module name or toolkit ID, as the system will make + * prefixed by for example the module name or toolkit ID, as the system will make * the keys globally unique. * * @see hook_requirements() @@ -152,7 +152,7 @@ public static function isAvailable(); * Returns a list of image file extensions supported by the toolkit. * * @return array - * An array of supported image file extensions (e.g. png/jpeg/gif). + * An array of supported image file extensions (for example png/jpeg/gif). */ public static function getSupportedExtensions(); @@ -163,7 +163,7 @@ public static function getSupportedExtensions(); * The toolkit operation to be processed. * @param array $arguments * An associative array of arguments to be passed to the toolkit - * operation, e.g. array('width' => 50, 'height' => 100, + * operation, for example array('width' => 50, 'height' => 100, * 'upscale' => TRUE). * * @return bool diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php index dcc3b3d..0c6b890 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php @@ -71,7 +71,7 @@ protected function getToolkit() { * "document" their operation, thus also if no arguments are expected. * * @return array - * An array whose keys are the names of the arguments (e.g. "width", + * An array whose keys are the names of the arguments (for example "width", * "degrees") and each value is an associative array having the following * keys: * - description: A string with the argument description. This is used only @@ -114,7 +114,7 @@ protected function prepareArguments(array $arguments) { else { // Optional arguments require a 'default' value. // We check this even if the argument is provided by the caller, as we - // want to fail fast here, i.e. at development time. + // want to fail fast here, that is at development time. if (!array_key_exists('default', $argument)) { // The plugin did not define a default, so throw a plugin exception, // not an invalid argument exception. diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php index 5fc434c..5fe8e86 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php @@ -64,7 +64,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac * @param \Drupal\Core\ImageToolkit\ImageToolkitInterface $toolkit * The toolkit instance. * @param string $operation - * The operation (e.g. "crop"). + * The operation (for example "crop"). * * @return string * The plugin ID. diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManagerInterface.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManagerInterface.php index 1bd4c82..bfd4362 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManagerInterface.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManagerInterface.php @@ -13,7 +13,7 @@ * @param \Drupal\Core\ImageToolkit\ImageToolkitInterface $toolkit * The toolkit instance. * @param string $operation - * The operation (e.g. "crop"). + * The operation (for example "crop"). * * @return \Drupal\Core\ImageToolkit\ImageToolkitOperationInterface * An instance of the requested toolkit operation plugin. diff --git a/core/lib/Drupal/Core/Language/LanguageInterface.php b/core/lib/Drupal/Core/Language/LanguageInterface.php index 2568cb3..c6ae01a 100644 --- a/core/lib/Drupal/Core/Language/LanguageInterface.php +++ b/core/lib/Drupal/Core/Language/LanguageInterface.php @@ -39,7 +39,7 @@ const LANGCODE_NOT_APPLICABLE = 'zxx'; /** - * Language code referring to the default language of data, e.g. of an entity. + * Language code referring to the default language of data, for example of an entity. * * See the BCP 47 syntax for defining private language tags: * http://www.rfc-editor.org/rfc/bcp/bcp47.txt diff --git a/core/lib/Drupal/Core/Language/LanguageManagerInterface.php b/core/lib/Drupal/Core/Language/LanguageManagerInterface.php index eaefd18..a791544 100644 --- a/core/lib/Drupal/Core/Language/LanguageManagerInterface.php +++ b/core/lib/Drupal/Core/Language/LanguageManagerInterface.php @@ -41,7 +41,7 @@ public function getDefinedLanguageTypesInfo(); * Returns the current language for the given type. * * @param string $type - * (optional) The language type; e.g., the interface or the content + * (optional) The language type; for example, the interface or the content * language. Defaults to * \Drupal\Core\Language\LanguageInterface::TYPE_INTERFACE. * @@ -54,7 +54,7 @@ public function getCurrentLanguage($type = LanguageInterface::TYPE_INTERFACE); * Resets the given language type or all types if none specified. * * @param string|null $type - * (optional) The language type to reset as a string, e.g., + * (optional) The language type to reset as a string, for example, * LanguageInterface::TYPE_INTERFACE, or NULL to reset all language types. * Defaults to NULL. * diff --git a/core/lib/Drupal/Core/Mail/MailManager.php b/core/lib/Drupal/Core/Mail/MailManager.php index 348dcee..ad8e965 100644 --- a/core/lib/Drupal/Core/Mail/MailManager.php +++ b/core/lib/Drupal/Core/Mail/MailManager.php @@ -165,7 +165,7 @@ public function getInstance(array $options) { * {@inheritdoc} */ public function mail($module, $key, $to, $langcode, $params = [], $reply = NULL, $send = TRUE) { - // Mailing can invoke rendering (e.g., generating URLs, replacing tokens), + // Mailing can invoke rendering (for example, generating URLs, replacing tokens), // but e-mails are not HTTP responses: they're not cached, they don't have // attachments. Therefore we perform mailing inside its own render context, // to ensure it doesn't leak into the render context for the HTTP response diff --git a/core/lib/Drupal/Core/Menu/ContextualLinkManagerInterface.php b/core/lib/Drupal/Core/Menu/ContextualLinkManagerInterface.php index 12f0275..ce46c52 100644 --- a/core/lib/Drupal/Core/Menu/ContextualLinkManagerInterface.php +++ b/core/lib/Drupal/Core/Menu/ContextualLinkManagerInterface.php @@ -25,7 +25,7 @@ public function getContextualLinkPluginsByGroup($group_name); * The group name. * @param array $route_parameters * The incoming route parameters. The route parameters need to have the same - * name on all contextual link routes, e.g. you cannot use 'node' and + * name on all contextual link routes, for example you cannot use 'node' and * 'entity' in parallel. * @param array $metadata * Additional metadata of contextual links, like the position (optional). diff --git a/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php b/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php index 7eefd12..51732ae 100644 --- a/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php +++ b/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php @@ -15,7 +15,7 @@ * - perform render cached menu-optimized access checking * - optimized node access checking * - generate a unique index for the elements in a tree and sorting by it - * - flatten a tree (i.e. a 1-dimensional tree) + * - flatten a tree (that is a 1-dimensional tree) */ class DefaultMenuLinkTreeManipulators { @@ -70,7 +70,7 @@ public function __construct(AccessManagerInterface $access_manager, AccountInter * the necessary cacheability metadata.) * * This is compatible with render caching, because of cache context bubbling: - * conditionally defined cache contexts (i.e. subtrees that are only + * conditionally defined cache contexts (that is subtrees that are only * accessible to some users) will bubble just like they do for render arrays. * This is why inaccessible subtrees are deleted, except at the top-level * inaccessible link: if we didn't keep the first (depth-wise) inaccessible diff --git a/core/lib/Drupal/Core/Menu/LocalTaskInterface.php b/core/lib/Drupal/Core/Menu/LocalTaskInterface.php index 7fb301e..0b3a25d 100644 --- a/core/lib/Drupal/Core/Menu/LocalTaskInterface.php +++ b/core/lib/Drupal/Core/Menu/LocalTaskInterface.php @@ -68,7 +68,7 @@ public function getOptions(RouteMatchInterface $route_match); * Sets the active status. * * @param bool $active - * Sets whether this tab is active (e.g. a parent of the current tab). + * Sets whether this tab is active (for example a parent of the current tab). * * @return \Drupal\Core\Menu\LocalTaskInterface * The called object for chaining. diff --git a/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php b/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php index 8410e5a..e465330 100644 --- a/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php +++ b/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php @@ -32,7 +32,7 @@ public function getActiveTrailIds($menu_name); * @return \Drupal\Core\Menu\MenuLinkInterface|null * The menu link for the given route name, parameters and menu, or NULL if * there is no matching menu link or the current user cannot access the - * current page (i.e. we have a 403 response). + * current page (that is we have a 403 response). */ public function getActiveLink($menu_name = NULL); diff --git a/core/lib/Drupal/Core/Menu/MenuLinkInterface.php b/core/lib/Drupal/Core/Menu/MenuLinkInterface.php index 37e7e39..e3feeb2 100644 --- a/core/lib/Drupal/Core/Menu/MenuLinkInterface.php +++ b/core/lib/Drupal/Core/Menu/MenuLinkInterface.php @@ -201,7 +201,7 @@ public function getFormClass(); * Returns route information for a route to delete the menu link. * * @return \Drupal\Core\Url|null - * A Url object, or NULL if there is no route (e.g. when the link is not + * A Url object, or NULL if there is no route (for example when the link is not * deletable). */ public function getDeleteRoute(); @@ -223,7 +223,7 @@ public function getEditRoute(); * Returns route information for a route to translate the menu link. * * @return \Drupal\Core\Url|null - * A Url object, or NULL if there is no route (e.g. when the link is not + * A Url object, or NULL if there is no route (for example when the link is not * translatable). */ public function getTranslateRoute(); diff --git a/core/lib/Drupal/Core/Menu/MenuLinkTree.php b/core/lib/Drupal/Core/Menu/MenuLinkTree.php index 8a6dce8..3b2d948 100644 --- a/core/lib/Drupal/Core/Menu/MenuLinkTree.php +++ b/core/lib/Drupal/Core/Menu/MenuLinkTree.php @@ -235,7 +235,7 @@ protected function buildItems(array $tree, CacheableMetadata &$tree_access_cache } // Gather the cacheability of every item in the menu link tree. Some links - // may be dynamic: they may have a dynamic text (e.g. a "Hi, " link + // may be dynamic: they may have a dynamic text (for example a "Hi, " link // text, which would vary by 'user' cache context), or a dynamic route // name or route parameters. $tree_link_cacheability = $tree_link_cacheability->merge(CacheableMetadata::createFromObject($data->link)); diff --git a/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php b/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php index f58dd91..961f6a4 100644 --- a/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php +++ b/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php @@ -88,7 +88,7 @@ class MenuLinkTreeElement { * The menu link for this element in the menu link tree. * @param bool $has_children * A flag as to whether this element has children even if they are not - * included in the tree (i.e. this may be TRUE even if $subtree is empty). + * included in the tree (that is this may be TRUE even if $subtree is empty). * @param int $depth * The depth of this element relative to the tree root. * @param bool $in_active_trail diff --git a/core/lib/Drupal/Core/Menu/MenuTreeStorage.php b/core/lib/Drupal/Core/Menu/MenuTreeStorage.php index f6578fe..8499dc1 100644 --- a/core/lib/Drupal/Core/Menu/MenuTreeStorage.php +++ b/core/lib/Drupal/Core/Menu/MenuTreeStorage.php @@ -150,7 +150,7 @@ public function rebuild(array $definitions) { $before_menus = $this->getMenuNames(); if ($definitions) { foreach ($definitions as $id => $link) { - // Flag this link as discovered, i.e. saved via rebuild(). + // Flag this link as discovered, that is saved via rebuild(). $link['discovered'] = 1; // Note: The parent we set here might be just stored in the {menu_tree} // table, so it will not end up in $top_links. Therefore the later loop @@ -891,7 +891,7 @@ protected function loadLinks($menu_name, MenuTreeParameters $parameters) { $query->fields($this->table); // Allow a custom root to be specified for loading a menu link tree. If - // omitted, the default root (i.e. the actual root, '') is used. + // omitted, the default root (that is the actual root, '') is used. if ($parameters->root !== '') { $root = $this->loadFull($parameters->root); diff --git a/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php b/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php index 0e36e13..a75b0a3 100644 --- a/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php +++ b/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php @@ -28,7 +28,7 @@ public function resetDefinitions(); * * Links that saved by passing definitions into this method must be included * on all future calls, or they will be purged. This allows for automatic - * cleanup e.g. when modules are uninstalled. + * cleanup for example when modules are uninstalled. * * @param array $definitions * The new menu link definitions. diff --git a/core/lib/Drupal/Core/Menu/menu.api.php b/core/lib/Drupal/Core/Menu/menu.api.php index f932cf9..d31607c 100644 --- a/core/lib/Drupal/Core/Menu/menu.api.php +++ b/core/lib/Drupal/Core/Menu/menu.api.php @@ -404,7 +404,7 @@ function hook_contextual_links_alter(array &$links, $group, array $route_paramet * - title: The displayed title of the link * - route_name: The route_name of the contextual link to be displayed * - group: The group under which the contextual links should be added to. - * Possible values are e.g. 'node' or 'menu'. + * Possible values are for example 'node' or 'menu'. * * @see \Drupal\Core\Menu\ContextualLinkManager * diff --git a/core/lib/Drupal/Core/Messenger/LegacyMessenger.php b/core/lib/Drupal/Core/Messenger/LegacyMessenger.php index ff323d2..8bf6db4 100644 --- a/core/lib/Drupal/Core/Messenger/LegacyMessenger.php +++ b/core/lib/Drupal/Core/Messenger/LegacyMessenger.php @@ -128,7 +128,7 @@ protected function getMessengerService() { // Prematurely creating $_SESSION['messages'] in this class' constructor // causes issues when the container attempts to initialize its own session // later down the road. This can only be done after it has been determined - // the Messenger service is not available (i.e. no container). It is also + // the Messenger service is not available (that is no container). It is also // reasonable to assume that if the container becomes available in a // subsequent request, a new instance of this class will be created and // this code will never be reached. This is merely for BC purposes. diff --git a/core/lib/Drupal/Core/Path/AliasStorage.php b/core/lib/Drupal/Core/Path/AliasStorage.php index a02bc35..037af39 100644 --- a/core/lib/Drupal/Core/Path/AliasStorage.php +++ b/core/lib/Drupal/Core/Path/AliasStorage.php @@ -420,14 +420,14 @@ public static function schemaDefinition() { 'not null' => TRUE, ], 'source' => [ - 'description' => 'The Drupal path this alias is for; e.g. node/12.', + 'description' => 'The Drupal path this alias is for; for example node/12.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ], 'alias' => [ - 'description' => 'The alias for this path; e.g. title-of-the-story.', + 'description' => 'The alias for this path; for example title-of-the-story.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, diff --git a/core/lib/Drupal/Core/PathProcessor/PathProcessorManager.php b/core/lib/Drupal/Core/PathProcessor/PathProcessorManager.php index 2a3181e..2663088 100644 --- a/core/lib/Drupal/Core/PathProcessor/PathProcessorManager.php +++ b/core/lib/Drupal/Core/PathProcessor/PathProcessorManager.php @@ -129,7 +129,7 @@ protected function getOutbound() { * Sorts the processors according to priority. * * @param string $type - * The processor type to sort, e.g. 'inboundProcessors'. + * The processor type to sort, for example 'inboundProcessors'. */ protected function sortProcessors($type) { $sorted = []; diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php b/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php index 55336d5..9443b75 100644 --- a/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php +++ b/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php @@ -44,7 +44,7 @@ class ContextDefinition implements ContextDefinitionInterface { protected $description; /** - * Whether the data is multi-valued, i.e. a list of data items. + * Whether the data is multi-valued, that is a list of data items. * * @var bool */ diff --git a/core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php b/core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php index f4dd288..af081d9 100644 --- a/core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php +++ b/core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php @@ -19,7 +19,7 @@ * @param \Drupal\Core\Plugin\PluginWithFormsInterface $plugin * The plugin the form is for. * @param string $operation - * The name of the operation to use, e.g., 'add' or 'edit'. + * The name of the operation to use, for example, 'add' or 'edit'. * @param string $fallback_operation * (optional) The name of the fallback operation to use. * diff --git a/core/lib/Drupal/Core/Queue/QueueInterface.php b/core/lib/Drupal/Core/Queue/QueueInterface.php index 6d86224..f2c85dc 100644 --- a/core/lib/Drupal/Core/Queue/QueueInterface.php +++ b/core/lib/Drupal/Core/Queue/QueueInterface.php @@ -33,7 +33,7 @@ public function createItem($data); * the queue. Depending on the implementation and the setup, the accuracy of * the results of this function may vary. * - * e.g. On a busy system with a large number of consumers and items, the + * for example On a busy system with a large number of consumers and items, the * result might only be valid for a fraction of a second and not provide an * accurate representation. * diff --git a/core/lib/Drupal/Core/Render/BareHtmlPageRendererInterface.php b/core/lib/Drupal/Core/Render/BareHtmlPageRendererInterface.php index 6c46c40..c1cc6fb 100644 --- a/core/lib/Drupal/Core/Render/BareHtmlPageRendererInterface.php +++ b/core/lib/Drupal/Core/Render/BareHtmlPageRendererInterface.php @@ -19,7 +19,7 @@ * - maintenance mode * - exception handlers * - * i.e. use this when rendering HTML pages in limited environments. Otherwise, + * that is use this when rendering HTML pages in limited environments. Otherwise, * use a @code _controller @endcode route, and return a render array. * This will cause a main content renderer * (\Drupal\Core\Render\MainContent\MainContentRendererInterface) to be diff --git a/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php index e394a39..962ab11 100644 --- a/core/lib/Drupal/Core/Render/Element.php +++ b/core/lib/Drupal/Core/Render/Element.php @@ -166,7 +166,7 @@ public static function isVisibleElement($element) { * @param array $map * An associative array whose keys are element property names and whose * values are the HTML attribute names to set on the corresponding - * property; e.g., array('#propertyname' => 'attributename'). If both names + * property; for example, array('#propertyname' => 'attributename'). If both names * are identical except for the leading '#', then an attribute name value is * sufficient and no property name needs to be specified. */ diff --git a/core/lib/Drupal/Core/Render/Element/Button.php b/core/lib/Drupal/Core/Render/Element/Button.php index 63451ea..e3c88bd 100644 --- a/core/lib/Drupal/Core/Render/Element/Button.php +++ b/core/lib/Drupal/Core/Render/Element/Button.php @@ -59,7 +59,7 @@ public function getInfo() { */ public static function processButton(&$element, FormStateInterface $form_state, &$complete_form) { // If this is a button intentionally allowing incomplete form submission - // (e.g., a "Previous" or "Add another item" button), then also skip + // (for example, a "Previous" or "Add another item" button), then also skip // client-side validation. if (isset($element['#limit_validation_errors']) && $element['#limit_validation_errors'] !== FALSE) { $element['#attributes']['formnovalidate'] = 'formnovalidate'; diff --git a/core/lib/Drupal/Core/Render/Element/Dropbutton.php b/core/lib/Drupal/Core/Render/Element/Dropbutton.php index 682f5cc..44c8a28 100644 --- a/core/lib/Drupal/Core/Render/Element/Dropbutton.php +++ b/core/lib/Drupal/Core/Render/Element/Dropbutton.php @@ -65,7 +65,7 @@ public static function preRenderDropbutton($element) { } array_unshift($element['#theme_wrappers'], 'dropbutton_wrapper'); - // Enable targeted theming of specific dropbuttons (e.g., 'operations' or + // Enable targeted theming of specific dropbuttons (for example, 'operations' or // 'operations__node'). if (isset($element['#subtype'])) { $element['#theme'] .= '__' . $element['#subtype']; diff --git a/core/lib/Drupal/Core/Render/Element/Item.php b/core/lib/Drupal/Core/Render/Element/Item.php index 6c282b3..b801719 100644 --- a/core/lib/Drupal/Core/Render/Element/Item.php +++ b/core/lib/Drupal/Core/Render/Element/Item.php @@ -7,7 +7,7 @@ * * Note: since this is a read-only field, setting the #required property will do * nothing except theme the form element to look as if it were actually required - * (i.e. by placing a red star next to the #title). + * (that is by placing a red star next to the #title). * * @FormElement("item") */ diff --git a/core/lib/Drupal/Core/Render/Element/MachineName.php b/core/lib/Drupal/Core/Render/Element/MachineName.php index ace452b..85a74a5 100644 --- a/core/lib/Drupal/Core/Render/Element/MachineName.php +++ b/core/lib/Drupal/Core/Render/Element/MachineName.php @@ -30,7 +30,7 @@ * re-used. The callback is only invoked if the submitted value differs from * the element's #default_value. * - source: (optional) The #array_parents of the form element containing the - * human-readable name (i.e., as contained in the $form structure) to use as + * human-readable name (that is, as contained in the $form structure) to use as * source for the machine name. Defaults to array('label'). * - label: (optional) Text to display as label for the machine name value * after the human-readable name form element. Defaults to t('Machine name'). @@ -218,7 +218,7 @@ public static function processMachineName(&$element, FormStateInterface $form_st * This checks that the submitted value: * - Does not contain the replacement character only. * - Does not contain disallowed characters. - * - Is unique; i.e., does not already exist. + * - Is unique; that is, does not already exist. * - Does not exceed the maximum length (via #maxlength). * - Cannot be changed after creation (via #disabled). */ diff --git a/core/lib/Drupal/Core/Render/Element/VerticalTabs.php b/core/lib/Drupal/Core/Render/Element/VerticalTabs.php index 759723b..7bc7313 100644 --- a/core/lib/Drupal/Core/Render/Element/VerticalTabs.php +++ b/core/lib/Drupal/Core/Render/Element/VerticalTabs.php @@ -122,7 +122,7 @@ public static function processVerticalTabs(&$element, FormStateInterface $form_s // The JavaScript stores the currently selected tab in this hidden // field so that the active tab can be restored the next time the - // form is rendered, e.g. on preview pages or when form validation + // form is rendered, for example on preview pages or when form validation // fails. $name = implode('__', $element['#parents']); if ($form_state->hasValue($name . '__active_tab')) { diff --git a/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php b/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php index 7b171f8..3c1ac44 100644 --- a/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php +++ b/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php @@ -233,7 +233,7 @@ public function processAttachments(AttachmentsInterface $response) { * original HTML response's content, but with the placeholders rendered. We * overwrite the existing content in the original HTML response object with * this markup. The markup that was rendered for the placeholders may also - * have attachments (e.g. for CSS/JS assets) itself, and cacheability metadata + * have attachments (for example for CSS/JS assets) itself, and cacheability metadata * that indicates what that markup depends on. That metadata is also added to * the HTML response object. * diff --git a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php index 5966668..a587279 100644 --- a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php +++ b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php @@ -245,7 +245,7 @@ protected function prepare(array $main_content, Request $request, RouteMatchInte // Some display variants need to be passed an array of contexts with // values because they can't get all their contexts globally. For example, // in Page Manager, you can create a Page which has a specific static - // context (e.g. a context that refers to the Node with nid 6), if any + // context (for example a context that refers to the Node with nid 6), if any // such contexts were added to the $event, pass them to the $page_display. if ($page_display instanceof ContextAwareVariantInterface) { $page_display->setContexts($event->getContexts()); diff --git a/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php b/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php index aa8b60c..0bf7c9b 100644 --- a/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php +++ b/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php @@ -10,7 +10,7 @@ * * Classes implementing this interface are able to render the main content (as * received from controllers) into a response of a certain format - * (HTML, JSON …) and/or in a certain decorated manner (e.g. in the case of the + * (HTML, JSON …) and/or in a certain decorated manner (for example in the case of the * default HTML main content renderer: with a page display variant applied). */ interface MainContentRendererInterface { diff --git a/core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php b/core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php index 0b11ab8..bb91f49 100644 --- a/core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php +++ b/core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php @@ -18,7 +18,7 @@ * @return array * The resulting placeholders, with a subset of the keys of $placeholders * (and those being the markup for the placeholders) but with the - * corresponding render array being potentially modified to render e.g. an + * corresponding render array being potentially modified to render for example an * ESI or BigPipe placeholder. */ public function processPlaceholders(array $placeholders); diff --git a/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php b/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php index 0422ecf..adbc9a3 100644 --- a/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php +++ b/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php @@ -23,8 +23,8 @@ * * This RenderCache implementation automatically replaces an element with a * placeholder: - * - on render cache hit, i.e. ::get() - * - on render cache miss, i.e. ::set() (in subsequent requests, it will be a + * - on render cache hit, that is ::get() + * - on render cache miss, that is ::set() (in subsequent requests, it will be a * cache hit) * * In either case, the render cache is guaranteed to contain the to-be-rendered diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index d435798..2715462 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -184,7 +184,7 @@ public function render(&$elements, $is_root_call = FALSE) { // functions or templates may be used for generating a render array's // content, and we might be rendering the main content for the page, it is // possible that any of them throw an exception that will cause a different - // page to be rendered (e.g. throwing + // page to be rendered (for example throwing // \Symfony\Component\HttpKernel\Exception\NotFoundHttpException will cause // the 404 page to be rendered). That page might also use // Renderer::renderRoot() but if exceptions aren't caught here, it will be diff --git a/core/lib/Drupal/Core/Render/RendererInterface.php b/core/lib/Drupal/Core/Render/RendererInterface.php index 5f8802d..078155f 100644 --- a/core/lib/Drupal/Core/Render/RendererInterface.php +++ b/core/lib/Drupal/Core/Render/RendererInterface.php @@ -319,7 +319,7 @@ public function renderPlaceholder($placeholder, array $elements); * The rendered HTML. * * @throws \LogicException - * When called outside of a render context (i.e. outside of a renderRoot(), + * When called outside of a render context (that is outside of a renderRoot(), * renderPlain() or executeInRenderContext() call). * @throws \Exception * If a #pre_render callback throws an exception, it is caught to mark the diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php index 754641c..a330700 100644 --- a/core/lib/Drupal/Core/Render/theme.api.php +++ b/core/lib/Drupal/Core/Render/theme.api.php @@ -182,7 +182,7 @@ * use): these are defined in the theme's *.info.yml file. * - Conditional page-level assets (loaded on all pages where the theme is in * use and a certain condition is met): these are attached in - * hook_page_attachments_alter(), e.g.: + * hook_page_attachments_alter(), for example: * @code * function THEME_page_attachments_alter(array &$page) { * if ($some_condition) { @@ -192,7 +192,7 @@ * @endcode * - Template-specific assets (loaded on all pages where a specific template is * in use): these can be added by in preprocessing functions, using @code - * $variables['#attached'] @endcode, e.g.: + * $variables['#attached'] @endcode, for example: * @code * function THEME_preprocess_menu_local_action(array &$variables) { * // We require Modernizr's touch test for button styling. @@ -355,7 +355,7 @@ * on information that's only valid for a limited time, respectively. Cache keys * should only be set on the portions of a render array that should be cached. * Contexts are automatically replaced with the value for the current request - * (e.g. the current language) and combined with the keys to form a cache ID. + * (for example the current language) and combined with the keys to form a cache ID. * The cache contexts, tags, and max-age will be propagated up the render array * hierarchy to determine cacheability for containing render array sections. * @@ -959,7 +959,7 @@ function hook_library_info_alter(&$libraries, $extension) { // Update the existing Farbtastic to version 2.0. $libraries['jquery.farbtastic']['version'] = '2.0'; // To accurately replace library files, the order of files and the options - // of each file have to be retained; e.g., like this: + // of each file have to be retained; for example, like this: $old_path = 'assets/vendor/farbtastic'; // Since the replaced library files are no longer located in a directory // relative to the original extension, specify an absolute path (relative diff --git a/core/lib/Drupal/Core/Routing/RouteMatch.php b/core/lib/Drupal/Core/Routing/RouteMatch.php index 10c4447..58cb788 100644 --- a/core/lib/Drupal/Core/Routing/RouteMatch.php +++ b/core/lib/Drupal/Core/Routing/RouteMatch.php @@ -72,7 +72,7 @@ public function __construct($route_name, Route $route, array $parameters = [], a * * @return \Drupal\Core\Routing\RouteMatchInterface * A new RouteMatch object if there's a matched route for the request. - * A new NullRouteMatch object otherwise (e.g., on a 404 page or when + * A new NullRouteMatch object otherwise (for example, on a 404 page or when * invoked prior to routing). */ public static function createFromRequest(Request $request) { diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php index 3b5c8d2..2f36131 100644 --- a/core/lib/Drupal/Core/Routing/UrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php @@ -291,7 +291,7 @@ public function generateFromRoute($name, $parameters = [], $options = [], $colle $name = $this->getRouteDebugMessage($name); $this->processRoute($name, $route, $parameters, $generated_url); $path = $this->getInternalPathFromRoute($name, $route, $parameters, $options['query']); - // Outbound path processors might need the route object for the path, e.g. + // Outbound path processors might need the route object for the path, for example // to get the path pattern. $options['route'] = $route; if ($options['path_processing']) { @@ -307,7 +307,7 @@ public function generateFromRoute($name, $parameters = [], $options = [], $colle // resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3 // so we need to encode them as they are not used for this purpose here // otherwise we would generate a URI that, when followed by a user agent - // (e.g. browser), does not match this route + // (for example browser), does not match this route $path = strtr($path, ['/../' => '/%2E%2E/', '/./' => '/%2E/']); if ('/..' === substr($path, -3)) { $path = substr($path, 0, -2) . '%2E%2E'; diff --git a/core/lib/Drupal/Core/Session/SessionManager.php b/core/lib/Drupal/Core/Session/SessionManager.php index 6071031..da8cacf 100644 --- a/core/lib/Drupal/Core/Session/SessionManager.php +++ b/core/lib/Drupal/Core/Session/SessionManager.php @@ -23,7 +23,7 @@ * necessary to subclass it at all. In order to reach the point where Drupal * can use the Symfony session management unmodified, the code implemented * here needs to be extracted either into a dedicated session handler proxy - * (e.g. sid-hashing) or relocated to the authentication subsystem. + * (for example sid-hashing) or relocated to the authentication subsystem. */ class SessionManager extends NativeSessionStorage implements SessionManagerInterface { diff --git a/core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php b/core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php index 4c11c8d..73c215f 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php +++ b/core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php @@ -195,7 +195,7 @@ public function stream_tell(); /** * Truncate stream. * - * Will respond to truncation; e.g., through ftruncate(). + * Will respond to truncation; for example, through ftruncate(). * * @param int $new_size * The new size. diff --git a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php index 83310f6..4acfad1 100644 --- a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php +++ b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php @@ -174,7 +174,7 @@ public function register() { */ public function unregister() { // Normally, there are definitely wrappers set for the ALL filter. However, - // in some cases involving many container rebuilds (e.g. WebTestBase), + // in some cases involving many container rebuilds (for example WebTestBase), // $this->wrappers may be empty although wrappers are still registered // globally. Thus an isset() check is needed before iterating. if (isset($this->wrappers[StreamWrapperInterface::ALL])) { diff --git a/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php b/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php index 4600c17..2b6124f 100644 --- a/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php +++ b/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php @@ -40,7 +40,7 @@ class PluralTranslatableMarkup extends TranslatableMarkup { * The item count to display. * @param string $singular * The string for the singular case. Make sure it is clear this is singular, - * to ease translation (e.g. use "1 new comment" instead of "1 new"). Do not + * to ease translation (for example use "1 new comment" instead of "1 new"). Do not * use @count in the singular string. * @param string $plural * The string for the plural case. Make sure it is clear this is plural, to diff --git a/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php b/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php index 3e9461a..89f18e0 100644 --- a/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php +++ b/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php @@ -99,7 +99,7 @@ class TranslatableMarkup extends FormattableMarkup { * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * for details about how to safely and correctly define variables in your * string.) Translators can then rearrange the string as necessary for the - * language (e.g., in Spanish, it might be "blog de @name"). + * language (for example, in Spanish, it might be "blog de @name"). * * @param string $string * A string containing the English text to translate. diff --git a/core/lib/Drupal/Core/StringTranslation/TranslationInterface.php b/core/lib/Drupal/Core/StringTranslation/TranslationInterface.php index 6a977b4..4acd7ce 100644 --- a/core/lib/Drupal/Core/StringTranslation/TranslationInterface.php +++ b/core/lib/Drupal/Core/StringTranslation/TranslationInterface.php @@ -83,7 +83,7 @@ public function translateString(TranslatableMarkup $translated_string); * The item count to display. * @param string $singular * The string for the singular case. Make sure it is clear this is singular, - * to ease translation (e.g. use "1 new comment" instead of "1 new"). Do not + * to ease translation (for example use "1 new comment" instead of "1 new"). Do not * use @count in the singular string. * @param string $plural * The string for the plural case. Make sure it is clear this is plural, to diff --git a/core/lib/Drupal/Core/TempStore/PrivateTempStore.php b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php index f9d1034..7a252ab 100644 --- a/core/lib/Drupal/Core/TempStore/PrivateTempStore.php +++ b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php @@ -18,7 +18,7 @@ * The PrivateTempStore is different from a cache, because the data in it is not * yet saved permanently and so it cannot be rebuilt. Typically, the * PrivateTempStore might be used to store work in progress that is later saved - * permanently elsewhere, e.g. autosave data, multistep forms, or in-progress + * permanently elsewhere, for example autosave data, multistep forms, or in-progress * changes to complex configuration that are not ready to be saved. * * The PrivateTempStore differs from the SharedTempStore in that all keys are diff --git a/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php b/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php index b80b825..952e7d1 100644 --- a/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php +++ b/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php @@ -74,7 +74,7 @@ public function __construct(KeyValueExpirableFactoryInterface $storage_factory, * * @param string $collection * The collection name to use for this key/value store. This is typically - * a shared namespace or module name, e.g. 'views', 'entity', etc. + * a shared namespace or module name, for example 'views', 'entity', etc. * * @return \Drupal\Core\TempStore\PrivateTempStore * An instance of the key/value store. diff --git a/core/lib/Drupal/Core/TempStore/SharedTempStore.php b/core/lib/Drupal/Core/TempStore/SharedTempStore.php index c131a80..87e22dd 100644 --- a/core/lib/Drupal/Core/TempStore/SharedTempStore.php +++ b/core/lib/Drupal/Core/TempStore/SharedTempStore.php @@ -17,10 +17,10 @@ * The SharedTempStore is different from a cache, because the data in it is not * yet saved permanently and so it cannot be rebuilt. Typically, the * SharedTempStore might be used to store work in progress that is later saved - * permanently elsewhere, e.g. autosave data, multistep forms, or in-progress + * permanently elsewhere, for example autosave data, multistep forms, or in-progress * changes to complex configuration that are not ready to be saved. * - * Each SharedTempStore belongs to a particular owner (e.g. a user, session, or + * Each SharedTempStore belongs to a particular owner (for example a user, session, or * process). Multiple owners may use the same key/value collection, and the * owner is stored along with the key/value pair. * @@ -59,7 +59,7 @@ class SharedTempStore { protected $requestStack; /** - * The owner key to store along with the data (e.g. a user or session ID). + * The owner key to store along with the data (for example a user or session ID). * * @var mixed */ @@ -84,7 +84,7 @@ class SharedTempStore { * @param \Drupal\Core\Lock\LockBackendInterface $lock_backend * The lock object used for this data. * @param mixed $owner - * The owner key to store along with the data (e.g. a user or session ID). + * The owner key to store along with the data (for example a user or session ID). * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack * The request stack. * @param int $expire diff --git a/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php index 90e816a..a90b7be 100644 --- a/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php +++ b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php @@ -63,7 +63,7 @@ public function __construct(KeyValueExpirableFactoryInterface $storage_factory, * * @param string $collection * The collection name to use for this key/value store. This is typically - * a shared namespace or module name, e.g. 'views', 'entity', etc. + * a shared namespace or module name, for example 'views', 'entity', etc. * @param mixed $owner * (optional) The owner of this SharedTempStore. By default, the * SharedTempStore is owned by the currently authenticated user, or by the diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index 7cf4b3c..23a7b51 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -47,9 +47,9 @@ class Registry implements DestructableInterface { * an associative array keyed by theme hook names, whose values are * associative arrays containing the aggregated hook definition: * - type: The type of the extension the original theme hook originates - * from; e.g., 'module' for theme hook 'node' of Node module. + * from; for example, 'module' for theme hook 'node' of Node module. * - name: The name of the extension the original theme hook originates - * from; e.g., 'node' for theme hook 'node' of Node module. + * from; for example, 'node' for theme hook 'node' of Node module. * - theme path: The effective \Drupal\Core\Theme\ActiveTheme::getPath() * during \Drupal\Core\Theme\ThemeManagerInterface::render(), available * as 'directory' variable in templates. For functions, it should point @@ -68,7 +68,7 @@ class Registry implements DestructableInterface { * In case of a theme template file: * - path: The path to the template file to use. Defaults to the * subdirectory 'templates' of the path of the extension implementing - * hook_theme(); e.g., 'core/modules/node/templates' for Node module. + * hook_theme(); for example, 'core/modules/node/templates' for Node module. * - template: The basename of the template file to use, without extension * (as the extension is specific to the theme engine). The template file * is in the directory defined by 'path'. @@ -302,14 +302,14 @@ public function getBaseHook($hook) { * * All theme hook definitions are essentially just collated and merged in the * above order. However, various extension-specific default values and - * customizations are required; e.g., to record the effective file path for + * customizations are required; for example, to record the effective file path for * theme template. Therefore, this method first collects all extensions per * type, and then dispatches the processing for each extension to * processExtension(). * * After completing the collection, modules are allowed to alter it. Lastly, * any derived and incomplete theme hook definitions that are hook suggestions - * for base hooks (e.g., 'block__node' for the base hook 'block') need to be + * for base hooks (for example, 'block__node' for the base hook 'block') need to be * determined based on the full registry and classified as 'base hook'. * * See the @link themeable Default theme implementations topic @endlink for diff --git a/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php b/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php index 2fe1a10..8064714 100644 --- a/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php +++ b/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php @@ -34,7 +34,7 @@ public function getPropertyDefinitions(); /** * Returns the name of the main property, if any. * - * Some field items consist mainly of one main property, e.g. the value of a + * Some field items consist mainly of one main property, for example the value of a * text field or the @code target_id @endcode of an entity reference. If the * field item has no main property, the method returns NULL. * diff --git a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php index 6396cb8..eea0953 100644 --- a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php +++ b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php @@ -3,7 +3,7 @@ namespace Drupal\Core\TypedData; /** - * Interface for complex data; i.e. data containing named and typed properties. + * Interface for complex data; that is data containing named and typed properties. * * The name of a property has to be a valid PHP variable name, starting with * an alphabetic character. @@ -32,7 +32,7 @@ public function getDataDefinition(); * Gets a property object. * * @param $property_name - * The name of the property to get; e.g., 'title' or 'name'. + * The name of the property to get; for example, 'title' or 'name'. * * @return \Drupal\Core\TypedData\TypedDataInterface * The property object. @@ -48,7 +48,7 @@ public function get($property_name); * Sets a property value. * * @param $property_name - * The name of the property to set; e.g., 'title' or 'name'. + * The name of the property to set; for example, 'title' or 'name'. * @param $value * The value to set, or NULL to unset the property. * @param bool $notify diff --git a/core/lib/Drupal/Core/TypedData/DataDefinition.php b/core/lib/Drupal/Core/TypedData/DataDefinition.php index 332659f..263e6e4 100644 --- a/core/lib/Drupal/Core/TypedData/DataDefinition.php +++ b/core/lib/Drupal/Core/TypedData/DataDefinition.php @@ -20,7 +20,7 @@ class DataDefinition implements DataDefinitionInterface, \ArrayAccess { * Creates a new data definition. * * @param string $type - * The data type of the data; e.g., 'string', 'integer' or 'any'. + * The data type of the data; for example, 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. diff --git a/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php b/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php index d12ccfd..4c4199d 100644 --- a/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php +++ b/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php @@ -30,7 +30,7 @@ * \Drupal\Core\TypedData\TypedDataManager::createDataDefinition() to build a * definition object for an arbitrary data type. When the definition class is * known, it is recommended to directly use the static create() method on that - * class instead; e.g.: + * class instead; for example: * @code * $map_definition = \Drupal\Core\TypedData\MapDataDefinition::create(); * @endcode @@ -41,7 +41,7 @@ * @return static * * @throws \InvalidArgumentException - * If an unsupported data type gets passed to the class; e.g., 'string' to a + * If an unsupported data type gets passed to the class; for example, 'string' to a * definition class handling 'entity:* data types. */ public static function createFromDataType($data_type); @@ -75,7 +75,7 @@ public function getLabel(); public function getDescription(); /** - * Returns whether the data is multi-valued, i.e. a list of data items. + * Returns whether the data is multi-valued, that is a list of data items. * * This is equivalent to checking whether the data definition implements the * \Drupal\Core\TypedData\ListDefinitionInterface interface. @@ -153,7 +153,7 @@ public function getSetting($setting_name); * \Drupal\Core\TypedData\TypedDataManager::getDefaultConstraints(). * * Constraints are defined via an array, having constraint plugin IDs as key - * and constraint options as values, e.g. + * and constraint options as values, for example * @code * $constraints = array( * 'Range' => array('min' => 5, 'max' => 10), @@ -171,7 +171,7 @@ public function getSetting($setting_name); * @endcode * * Note that the specified constraints must be compatible with the data type, - * e.g. for data of type 'entity' the 'EntityType' and 'Bundle' constraints + * for example for data of type 'entity' the 'EntityType' and 'Bundle' constraints * may be specified. * * @see \Drupal\Core\Validation\ConstraintManager @@ -192,7 +192,7 @@ public function getConstraints(); * details. * * @param string $constraint_name - * The name of the constraint, i.e. its plugin id. + * The name of the constraint, that is its plugin id. * * @return array * A validation constraint definition which can be used for instantiating a @@ -209,7 +209,7 @@ public function getConstraint($constraint_name); * details. * * @param string $constraint_name - * The name of the constraint to add, i.e. its plugin id. + * The name of the constraint to add, that is its plugin id. * @param array|null $options * The constraint options as required by the constraint plugin, or NULL. * diff --git a/core/lib/Drupal/Core/TypedData/Exception/MissingDataException.php b/core/lib/Drupal/Core/TypedData/Exception/MissingDataException.php index f131907..1e87590 100644 --- a/core/lib/Drupal/Core/TypedData/Exception/MissingDataException.php +++ b/core/lib/Drupal/Core/TypedData/Exception/MissingDataException.php @@ -3,6 +3,6 @@ namespace Drupal\Core\TypedData\Exception; /** - * Exception thrown when an operation misses a data value; i.e., it is unset. + * Exception thrown when an operation misses a data value; that is, it is unset. */ class MissingDataException extends \Exception {} diff --git a/core/lib/Drupal/Core/TypedData/ListDataDefinition.php b/core/lib/Drupal/Core/TypedData/ListDataDefinition.php index 001c58b..0dee7fc 100644 --- a/core/lib/Drupal/Core/TypedData/ListDataDefinition.php +++ b/core/lib/Drupal/Core/TypedData/ListDataDefinition.php @@ -18,7 +18,7 @@ class ListDataDefinition extends DataDefinition implements ListDataDefinitionInt * Creates a new list definition. * * @param string $item_type - * The data type of the list items; e.g., 'string', 'integer' or 'any'. + * The data type of the list items; for example, 'string', 'integer' or 'any'. * * @return \Drupal\Core\TypedData\ListDataDefinition * A new List Data Definition object. diff --git a/core/lib/Drupal/Core/TypedData/ListDataDefinitionInterface.php b/core/lib/Drupal/Core/TypedData/ListDataDefinitionInterface.php index 858d205..0e8a9c8 100644 --- a/core/lib/Drupal/Core/TypedData/ListDataDefinitionInterface.php +++ b/core/lib/Drupal/Core/TypedData/ListDataDefinitionInterface.php @@ -22,7 +22,7 @@ * \Drupal\Core\TypedData\TypedDataManager::createListDataDefinition() to * build a definition object for an arbitrary item type. When the definition * class is known, it is recommended to directly use the static create() - * method on that class instead; e.g.: + * method on that class instead; for example: * @code * $list_definition = \Drupal\Core\TypedData\ListDataDefinition::create('string'); * @endcode @@ -33,7 +33,7 @@ * @return static * * @throws \InvalidArgumentException - * If an unsupported data type gets passed to the class; e.g., 'string' to a + * If an unsupported data type gets passed to the class; for example, 'string' to a * definition class handling lists of 'field_item:* data types. */ public static function createFromItemType($item_type); diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php index 9f74c4f..a483dfc 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php @@ -7,7 +7,7 @@ /** * Defines the 'language' data type. * - * The plain value of a language is the language object, i.e. an instance of + * The plain value of a language is the language object, that is an instance of * \Drupal\Core\Language\Language. For setting the value the language object or * the language code as string may be passed. * diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/LanguageReference.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/LanguageReference.php index 4f76bda..71bb594 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/LanguageReference.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/LanguageReference.php @@ -8,9 +8,9 @@ * Defines the 'language_reference' data type. * * This serves as 'language' property of language field items and gets - * its value set from the parent, i.e. LanguageItem. + * its value set from the parent, that is LanguageItem. * - * The plain value is the language object, i.e. an instance of + * The plain value is the language object, that is an instance of * \Drupal\Core\Language\Language. For setting the value the language object or * the language code as string may be passed. * diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php index a95c14b..6d33709 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php @@ -8,7 +8,7 @@ /** * The "map" data type. * - * The "map" data type represent a simple complex data type, e.g. for + * The "map" data type represent a simple complex data type, for example for * representing associative arrays. It can also serve as base class for any * complex data type. * diff --git a/core/lib/Drupal/Core/TypedData/TypedDataInterface.php b/core/lib/Drupal/Core/TypedData/TypedDataInterface.php index a6892d2..c60a68b 100644 --- a/core/lib/Drupal/Core/TypedData/TypedDataInterface.php +++ b/core/lib/Drupal/Core/TypedData/TypedDataInterface.php @@ -113,7 +113,7 @@ public function applyDefaultValue($notify = TRUE); public function getName(); /** - * Returns the parent data structure; i.e. either complex data or a list. + * Returns the parent data structure; that is either complex data or a list. * * @return \Drupal\Core\TypedData\TraversableTypedDataInterface|null * The parent data structure, either complex data or a list; or NULL if this @@ -124,7 +124,7 @@ public function getParent(); /** * Returns the root of the typed data tree. * - * Returns the root data for a tree of typed data objects; e.g. for an entity + * Returns the root data for a tree of typed data objects; for example for an entity * field item the root of the tree is its parent entity object. * * @return \Drupal\Core\TypedData\TraversableTypedDataInterface @@ -136,7 +136,7 @@ public function getRoot(); * Returns the property path of the data. * * The trail of property names relative to the root of the typed data tree, - * separated by dots; e.g. 'field_text.0.format'. + * separated by dots; for example 'field_text.0.format'. * * @return string * The property path relative to the root of the typed tree, or an empty diff --git a/core/lib/Drupal/Core/TypedData/TypedDataManager.php b/core/lib/Drupal/Core/TypedData/TypedDataManager.php index dbf0d5f..1a5cb7a 100644 --- a/core/lib/Drupal/Core/TypedData/TypedDataManager.php +++ b/core/lib/Drupal/Core/TypedData/TypedDataManager.php @@ -81,7 +81,7 @@ public function createInstance($data_type, array $configuration = []) { throw new \InvalidArgumentException("Invalid data type '$data_type' has been given"); } - // Allow per-data definition overrides of the used classes, i.e. take over + // Allow per-data definition overrides of the used classes, that is take over // classes specified in the type definition. $class = $data_definition->getClass(); diff --git a/core/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php b/core/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php index 29723c6..51dd5e8 100644 --- a/core/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php +++ b/core/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php @@ -18,8 +18,8 @@ * @param string $data_type * The data type, for which a typed object should be instantiated. * @param array $configuration - * The plugin configuration array, i.e. an array with the following keys: - * - data_definition: The data definition object, i.e. an instance of + * The plugin configuration array, that is an array with the following keys: + * - data_definition: The data definition object, that is an instance of * \Drupal\Core\TypedData\DataDefinitionInterface. * - name: The name of the property or the delta of the list item if a * property or list item is to be created. Otherwise, this should be set @@ -139,7 +139,7 @@ public function getInstance(array $options); * instantiated very often. * * Prototyping is done by the root object's data type and the given - * property path, i.e. all property instances having the same property path + * property path, that is all property instances having the same property path * and inheriting from the same data type are prototyped. * * @param \Drupal\Core\TypedData\TypedDataInterface $object diff --git a/core/lib/Drupal/Core/Url.php b/core/lib/Drupal/Core/Url.php index 76dc46c..8e64bb9 100644 --- a/core/lib/Drupal/Core/Url.php +++ b/core/lib/Drupal/Core/Url.php @@ -169,10 +169,10 @@ public static function fromRouteMatch(RouteMatchInterface $route_match) { * User input for a link or path. The first character must be one of the * following characters: * - '/': A path within the current site. This path might be to a Drupal - * route (e.g., '/admin'), to a file (e.g., '/README.txt'), or to - * something processed by a non-Drupal script (e.g., + * route (for example, '/admin'), to a file (for example, '/README.txt'), or to + * something processed by a non-Drupal script (for example, * '/not/a/drupal/page'). If the path matches a Drupal route, then the - * URL generation will include Drupal's path processors (e.g., + * URL generation will include Drupal's path processors (for example, * language-prefixing and aliasing). Otherwise, the URL generation will * just append the passed-in path to Drupal's base path. * - '?': A query string for the current page or resource. @@ -180,7 +180,7 @@ public static function fromRouteMatch(RouteMatchInterface $route_match) { * This helps reduce ambiguity for user-entered links and paths, and * supports user interfaces where users may normally use auto-completion * to search for existing resources, but also may type one of these - * characters to link to (e.g.) a specific path on the site. + * characters to link to (for example) a specific path on the site. * (With regard to the URI specification, the user input is treated as a * @link https://tools.ietf.org/html/rfc3986#section-4.2 relative URI reference @endlink * where the relative part is of type @@ -341,7 +341,7 @@ public static function fromUri($uri, $options = []) { protected static function fromEntityUri(array $uri_parts, array $options, $uri) { list($entity_type_id, $entity_id) = explode('/', $uri_parts['path'], 2); if ($uri_parts['scheme'] != 'entity' || $entity_id === '') { - throw new \InvalidArgumentException("The entity URI '$uri' is invalid. You must specify the entity id in the URL. e.g., entity:node/1 for loading the canonical path to node entity with id 1."); + throw new \InvalidArgumentException("The entity URI '$uri' is invalid. You must specify the entity id in the URL. for example, entity:node/1 for loading the canonical path to node entity with id 1."); } return new static("entity.$entity_type_id.canonical", [$entity_type_id => $entity_id], $options); @@ -353,11 +353,11 @@ protected static function fromEntityUri(array $uri_parts, array $options, $uri) * Important note: the URI minus the scheme can NOT simply be validated by a * \Drupal\Core\Path\PathValidatorInterface implementation. The semantics of * the 'internal:' URI scheme are different: - * - PathValidatorInterface accepts paths without a leading slash (e.g. + * - PathValidatorInterface accepts paths without a leading slash (for example * 'node/add') as well as 2 special paths: '' and '', which are * mapped to the correspondingly named routes. * - 'internal:' URIs store paths with a leading slash that represents the - * root — i.e. the front page — (e.g. 'internal:/node/add'), and doesn't + * root — that is the front page — (for example 'internal:/node/add'), and doesn't * have any exceptions. * * To clarify, a few examples of path plus corresponding 'internal:' URI: @@ -401,7 +401,7 @@ protected static function fromInternalUri(array $uri_parts, array $options) { } else { if ($uri_parts['path'][0] !== '/') { - throw new \InvalidArgumentException("The internal path component '{$uri_parts['path']}' is invalid. Its path component must have a leading slash, e.g. internal:/foo."); + throw new \InvalidArgumentException("The internal path component '{$uri_parts['path']}' is invalid. Its path component must have a leading slash, for example internal:/foo."); } // Remove the leading slash. $uri_parts['path'] = substr($uri_parts['path'], 1); @@ -441,7 +441,7 @@ protected static function fromRouteUri(array $uri_parts, array $options, $uri) { $route_parts = explode(';', $uri_parts['path'], 2); $route_name = $route_parts[0]; if ($route_name === '') { - throw new \InvalidArgumentException("The route URI '$uri' is invalid. You must have a route name in the URI. e.g., route:system.admin"); + throw new \InvalidArgumentException("The route URI '$uri' is invalid. You must have a route name in the URI. for example, route:system.admin"); } $route_parameters = []; if (!empty($route_parts[1])) { diff --git a/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php b/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php index 6d68c1e..96384f4 100644 --- a/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php +++ b/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php @@ -61,7 +61,7 @@ public function assemble($uri, array $options = [], $collect_bubbleable_metadata // UrlHelper::isExternal() only returns true for safe protocols. return $this->buildExternalUrl($uri, $options, $collect_bubbleable_metadata); } - throw new \InvalidArgumentException("The URI '$uri' is invalid. You must use a valid URI scheme. Use base: for a path, e.g., to a Drupal file that needs the base path. Do not use this for internal paths controlled by Drupal."); + throw new \InvalidArgumentException("The URI '$uri' is invalid. You must use a valid URI scheme. Use base: for a path, for example, to a Drupal file that needs the base path. Do not use this for internal paths controlled by Drupal."); } /** @@ -114,7 +114,7 @@ protected function buildLocalUrl($uri, array $options = [], $collect_bubbleable_ // @see \Drupal\path\Controller\PathController::adminOverview(). if (!empty($options['path_processing'])) { // Do not pass the request, since this is a special case and we do not - // want to include e.g. the request language in the processing. + // want to include for example the request language in the processing. $uri = $this->pathProcessor->processOutbound($uri, $options, NULL, $generated_url); } // Strip leading slashes from internal paths to prevent them becoming diff --git a/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php b/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php index 4422055..2560754 100644 --- a/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php +++ b/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php @@ -18,12 +18,12 @@ * or "http://example.com/foo". * - If you provide a full URL, it will be considered an external URL as * long as it has an allowed protocol. - * - If you provide only a local URI (e.g. "base:foo"), it will be + * - If you provide only a local URI (for example "base:foo"), it will be * considered a path local to Drupal, but not handled by the routing * system. The base path (the subdirectory where the front controller * is found) will be added to the path. Additional query arguments for * local paths must be supplied in $options['query'], not part of $uri. - * - If your external URL contains a query (e.g. http://example.com/foo?a=b), + * - If your external URL contains a query (for example http://example.com/foo?a=b), * then you can either URL encode the query keys and values yourself and * include them in $uri, or use $options['query'] to let this method * URL encode them. diff --git a/core/lib/Drupal/Core/Utility/token.api.php b/core/lib/Drupal/Core/Utility/token.api.php index 5916752..4d7d47b 100644 --- a/core/lib/Drupal/Core/Utility/token.api.php +++ b/core/lib/Drupal/Core/Utility/token.api.php @@ -44,8 +44,8 @@ * The bubbleable metadata. Prior to invoking this hook, * \Drupal\Core\Utility\Token::generate() collects metadata for all of the * data objects in $data. For any data sources not in $data, but that are - * used by the token replacement logic, such as global configuration (e.g., - * 'system.site') and related objects (e.g., $node->getOwner()), + * used by the token replacement logic, such as global configuration (for example, + * 'system.site') and related objects (for example, $node->getOwner()), * implementations of this hook must add the corresponding metadata. * For example: * @code @@ -194,7 +194,7 @@ function hook_tokens_alter(array &$replacements, array $context, \Drupal\Core\Re * - description (optional): A translated longer description of the token * type. * - needs-data: The type of data that must be provided to - * \Drupal\Core\Utility\Token::replace() in the $data argument (i.e., the + * \Drupal\Core\Utility\Token::replace() in the $data argument (that is, the * key name in $data) in order for tokens of this type to be used in the * $text being processed. For instance, if the token needs a node object, * 'needs-data' should be 'node', and to use this token in diff --git a/core/lib/Drupal/Core/Validation/DrupalTranslator.php b/core/lib/Drupal/Core/Validation/DrupalTranslator.php index 505deca..df8a400 100644 --- a/core/lib/Drupal/Core/Validation/DrupalTranslator.php +++ b/core/lib/Drupal/Core/Validation/DrupalTranslator.php @@ -36,7 +36,7 @@ public function transChoice($id, $number, array $parameters = [], $domain = NULL $ids = explode('|', $id); if (!isset($ids[1])) { - throw new \InvalidArgumentException(sprintf('The message "%s" cannot be pluralized, because it is missing a plural (e.g. "There is one apple|There are @count apples").', $id)); + throw new \InvalidArgumentException(sprintf('The message "%s" cannot be pluralized, because it is missing a plural (for example "There is one apple|There are @count apples").', $id)); } // Normally, calls to formatPlural() need to use literal strings, like