Commit 1d6e7e25 authored by catch's avatar catch

Issue #2851394 by GoZ, hgunicamp, oknate, jungle, wolffereast, tameeshb,...

Issue #2851394 by GoZ, hgunicamp, oknate, jungle, wolffereast, tameeshb, mmatsoo, ridhimaabrol24, jofitz, swarad07, tanc, shaktik, dimaro, shashikant_chauhan, MerryHamster, quietone, nitesh624, martin_q, boaloysius, gaurav.kapoor, nitvirus, ankithashetty, Munavijayalakshmi, kostyashupenko, leolando.tan, amit.drupal, ravi.shankar, akashkrishnan01, Swapnil_Kotwal, Saviktor, mrinalini9, anmolgoyal74, Venkatesh Rajan.J, shimpy, lomasr, Dinesh18, shubham.prakash, mahtab_alam, markdorison, cilefen, longwave, bleen, xjm, alexpott, gmaltoni: Fix grammar 'a' to 'an' when necessary
parent 0ea2e4d0
......@@ -143,7 +143,7 @@ function drupal_find_theme_functions($cache, $prefixes) {
// Find theme functions that implement possible "suggestion" variants of
// registered theme hooks and add those as new registered theme hooks.
// The 'pattern' key defines a common prefix that all suggestions must
// start with. The default is the name of the hook followed by '__'. An
// start with. The default is the name of the hook followed by '__'. A
// 'base hook' key is added to each entry made for a found suggestion,
// so that common functionality can be implemented for all suggestions of
// the same base hook. To keep things simple, deep hierarchy of
......
......@@ -15,7 +15,7 @@ class InvalidPluginDefinitionException extends PluginException {
protected $pluginId;
/**
* Constructs a InvalidPluginDefinitionException.
* Constructs an InvalidPluginDefinitionException.
*
* For the remaining parameters see \Exception.
*
......
......@@ -8,7 +8,7 @@
class PluginNotFoundException extends PluginException {
/**
* Construct an PluginNotFoundException exception.
* Construct a PluginNotFoundException exception.
*
* For the remaining parameters see \Exception.
*
......
......@@ -45,8 +45,8 @@ class Html {
* <command> tag anymore.
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/command.
* - The 'manifest' attribute is omitted because it only exists for the <html>
* tag. That tag only makes sense in a HTML-served-as-HTML context, in which
* case relative URLs are guaranteed to work.
* tag. That tag only makes sense in an HTML-served-as-HTML context, in
* which case relative URLs are guaranteed to work.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
* @see https://stackoverflow.com/questions/2725156/complete-list-of-html-tag-attributes-which-have-a-url-value
......
......@@ -242,14 +242,14 @@ public static function isExternal($path) {
* TRUE if the URL has the same domain and base path.
*
* @throws \InvalidArgumentException
* Exception thrown when a either $url or $bath_url are not fully qualified.
* Exception thrown when either $url or $base_url are not fully qualified.
*/
public static function externalIsLocal($url, $base_url) {
// Some browsers treat \ as / so normalize to forward slashes.
$url = str_replace('\\', '/', $url);
// Leading control characters may be ignored or mishandled by browsers, so
// assume such a path may lead to an non-local location. The \p{C} character
// assume such a path may lead to a non-local location. The \p{C} character
// class matches all UTF-8 control, unassigned, and private characters.
if (preg_match('/^\p{C}/u', $url) !== 0) {
return FALSE;
......
......@@ -55,7 +55,7 @@ class AccessManager implements AccessManagerInterface {
protected $checkProvider;
/**
* Constructs a AccessManager instance.
* Constructs an AccessManager instance.
*
* @param \Drupal\Core\Routing\RouteProviderInterface $route_provider
* The route provider.
......
......@@ -70,7 +70,7 @@ class EmailAction extends ConfigurableActionBase implements ContainerFactoryPlug
protected $emailValidator;
/**
* Constructs a EmailAction object.
* Constructs an EmailAction object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
......
......@@ -21,7 +21,7 @@ abstract class EntityActionBase extends ActionBase implements DependentPluginInt
protected $entityTypeManager;
/**
* Constructs a EntityActionBase object.
* Constructs an EntityActionBase object.
*
* @param mixed[] $configuration
* A configuration array containing information about the plugin instance.
......
......@@ -71,7 +71,7 @@ class AjaxResponseAttachmentsProcessor implements AttachmentsResponseProcessorIn
protected $moduleHandler;
/**
* Constructs a AjaxResponseAttachmentsProcessor object.
* Constructs an AjaxResponseAttachmentsProcessor object.
*
* @param \Drupal\Core\Asset\AssetResolverInterface $asset_resolver
* An asset resolver.
......
......@@ -3,7 +3,7 @@
namespace Drupal\Core\Ajax;
/**
* Defines an AJAX command to open content in a dialog in a off-canvas dialog.
* Defines an AJAX command to open content in a dialog in an off-canvas tray.
*
* @ingroup ajax
*/
......@@ -18,7 +18,7 @@ class OpenOffCanvasDialogCommand extends OpenDialogCommand {
* Constructs an OpenOffCanvasDialogCommand object.
*
* The off-canvas dialog differs from the normal modal provided by
* OpenDialogCommand in that a off-canvas has built in positioning and
* OpenDialogCommand in that an off-canvas has built in positioning and
* behaviors. Drupal provides a built-in off-canvas dialog for this purpose,
* so the selector is hard-coded in the call to the parent constructor.
*
......
......@@ -34,7 +34,7 @@ class UpdateBuildIdCommand implements CommandInterface {
protected $new;
/**
* Constructs a UpdateBuildIdCommand object.
* Constructs an UpdateBuildIdCommand object.
*
* @param string $old
* The old build_id.
......
......@@ -25,7 +25,7 @@ class ArchiverManager extends DefaultPluginManager {
protected $fileSystem;
/**
* Constructs a ArchiverManager object.
* Constructs an ArchiverManager object.
*
* @param \Traversable $namespaces
* An object that implements \Traversable which contains the root paths
......
......@@ -3,7 +3,7 @@
namespace Drupal\Core\Archiver;
/**
* Defines a archiver implementation for .tar files.
* Defines an archiver implementation for .tar files.
*/
class Tar implements ArchiverInterface {
......
......@@ -3,7 +3,7 @@
namespace Drupal\Core\Archiver;
/**
* Defines a archiver implementation for .zip files.
* Defines an archiver implementation for .zip files.
*
* @link http://php.net/zip
*/
......
......@@ -16,7 +16,7 @@ interface AssetDumperInterface {
* The file extension of this asset.
*
* @return string
* An URI to access the dumped asset.
* A URI to access the dumped asset.
*/
public function dump($data, $file_extension);
......
......@@ -21,7 +21,7 @@ interface ConfigFactoryInterface {
public function get($name);
/**
* Returns an mutable configuration object for a given name.
* Returns a mutable configuration object for a given name.
*
* Should not be used for config that will have runtime effects. Therefore it
* is always loaded override free.
......
......@@ -23,7 +23,7 @@
*
* @see \Drupal\Core\Config\StorageComparerInterface
*
* The ConfigImporter has a identifier which is used to construct event names.
* The ConfigImporter has an identifier which is used to construct event names.
* The events fired during an import are:
* - ConfigEvents::IMPORT_VALIDATE: Events listening can throw a
* \Drupal\Core\Config\ConfigImporterException to prevent an import from
......@@ -1039,7 +1039,7 @@ protected function importInvokeRename($collection, $rename_name) {
}
/**
* Determines if a import is already running.
* Determines if an import is already running.
*
* @return bool
* TRUE if an import is already running, FALSE if not.
......
......@@ -59,7 +59,7 @@ public function __construct(EntityTypeInterface $entity_type, $conjunction, Conf
* Overrides \Drupal\Core\Entity\Query\QueryBase::condition().
*
* Additional to the syntax defined in the QueryInterface you can use
* placeholders (*) to match all keys of an subarray. Let's take the follow
* placeholders (*) to match all keys of a subarray. Let's take the follow
* yaml file as example:
* @code
* level1:
......
......@@ -1722,7 +1722,7 @@ public function commit() {
}
/**
* Retrieves an unique ID from a given sequence.
* Retrieves a unique ID from a given sequence.
*
* Use this function if for some reason you can't use a serial field. For
* example, MySQL has no ways of reading of the current value of a sequence
......
......@@ -38,7 +38,7 @@ abstract class Database {
const RETURN_INSERT_ID = 3;
/**
* An nested array of all active connections. It is keyed by database name
* A nested array of all active connections. It is keyed by database name
* and target.
*
* @var array
......
......@@ -319,7 +319,7 @@ public function getFullQualifiedTableName($table) {
}
/**
* Add a new savepoint with an unique name.
* Add a new savepoint with a unique name.
*
* The main use for this method is to mimic InnoDB functionality, which
* provides an inherent savepoint before any query in a transaction.
......
......@@ -99,7 +99,7 @@ public function orderBy($field, $direction = 'ASC') {
}
}
// If $field contains an characters which are not allowed in a field name
// If $field contains characters which are not allowed in a field name
// it is considered an expression, these can't be handled automatically
// either.
if ($this->connection->escapeField($field) != $field) {
......
......@@ -366,7 +366,7 @@ public function addField($table, $field, $specification, $keys_new = []) {
// Build the mapping between the old fields and the new fields.
$mapping = [];
if (isset($specification['initial_from_field'])) {
// If we have a initial value, copy it over.
// If we have an initial value, copy it over.
if (isset($specification['initial'])) {
$expression = 'COALESCE(' . $specification['initial_from_field'] . ', :default_initial_value)';
$arguments = [':default_initial_value' => $specification['initial']];
......@@ -381,7 +381,7 @@ public function addField($table, $field, $specification, $keys_new = []) {
];
}
elseif (isset($specification['initial'])) {
// If we have a initial value, copy it over.
// If we have an initial value, copy it over.
$mapping[$field] = [
'expression' => ':newfieldinitial',
'arguments' => [':newfieldinitial' => $specification['initial']],
......
......@@ -48,10 +48,10 @@ interface ConditionInterface {
* The value to test the field against. In most cases, and depending on the
* 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
* and $value should be a SelectInterface object.
* also be a SelectInterface or an array of SelectInterfaces. 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 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 =, <>, <, <=, >, >=.
......
......@@ -432,7 +432,7 @@ function hook_query_alter(Drupal\Core\Database\Query\AlterableInterface $query)
* a listing (e.g., from Views) and therefore require access control.
*
* @param $query
* An Query object describing the composite parts of a SQL query.
* A Query object describing the composite parts of a SQL query.
*
* @see hook_query_alter()
* @see node_query_node_access_alter()
......
......@@ -154,7 +154,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form
* element, no other format will work. See the
* DateFormatterInterface::format() function for a list of the possible
* formats and HTML5 standards for the HTML5 requirements. Defaults to the
* right HTML5 format for the chosen element if a HTML5 element is used,
* right HTML5 format for the chosen element if an HTML5 element is used,
* otherwise defaults to DateFormat::load('html_date')->getPattern().
* - #date_date_element: The date element. Options are:
* - datetime: Use the HTML5 datetime element type.
......@@ -164,7 +164,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form
* - none: Do not display a date element.
* - #date_date_callbacks: Array of optional callbacks for the date element.
* - #date_time_element: The time element. Options are:
* - time: Use a HTML5 time element type.
* - time: Use an HTML5 time element type.
* - text: No HTML5 element, use a normal text field.
* - none: Do not display a time element.
* - #date_time_format: A date format string that describes the format that
......@@ -173,7 +173,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form
* element, no other format will work. See the
* DateFormatterInterface::format() function for a list of the possible
* formats and HTML5 standards for the HTML5 requirements. Defaults to the
* right HTML5 format for the chosen element if a HTML5 element is used,
* right HTML5 format for the chosen element if an HTML5 element is used,
* otherwise defaults to DateFormat::load('html_time')->getPattern().
* - #date_time_callbacks: An array of optional callbacks for the time
* element. Can be used to add a jQuery timepicker or an 'All day' checkbox.
......@@ -394,7 +394,7 @@ public static function formatExample($format) {
}
/**
* Retrieves the right format for a HTML5 date element.
* Retrieves the right format for an HTML5 date element.
*
* The format is important because these elements will not work with any other
* format.
......@@ -404,7 +404,7 @@ public static function formatExample($format) {
*
* @return string
* Returns the right format for the date element, or the original format
* if this is not a HTML5 element.
* if this is not an HTML5 element.
*/
protected static function getHtml5DateFormat($element) {
switch ($element['#date_date_element']) {
......@@ -421,7 +421,7 @@ protected static function getHtml5DateFormat($element) {
}
/**
* Retrieves the right format for a HTML5 time element.
* Retrieves the right format for an HTML5 time element.
*
* The format is important because these elements will not work with any other
* format.
......@@ -431,7 +431,7 @@ protected static function getHtml5DateFormat($element) {
*
* @return string
* Returns the right format for the time element, or the original format
* if this is not a HTML5 element.
* if this is not an HTML5 element.
*/
protected static function getHtml5TimeFormat($element) {
switch ($element['#date_time_element']) {
......
......@@ -3,7 +3,8 @@
namespace Drupal\Core\DependencyInjection;
/**
* Provides an interface to get a instance of a class with dependency injection.
* Provides an interface to get an instance of a class with dependency
* injection.
*/
interface ClassResolverInterface {
......
......@@ -13,7 +13,7 @@
use Symfony\Component\Validator\ConstraintViolationListInterface;
/**
* Configuration entity that contains widget options for all components of a
* Configuration entity that contains widget options for all components of an
* entity form in a given form mode.
*
* @ConfigEntityType(
......
......@@ -19,7 +19,7 @@ class EntityAutocompleteMatcher implements EntityAutocompleteMatcherInterface {
protected $selectionManager;
/**
* Constructs a EntityAutocompleteMatcher object.
* Constructs an EntityAutocompleteMatcher object.
*
* @param \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface $selection_manager
* The entity reference selection handler plugin manager.
......
......@@ -28,7 +28,7 @@ class EntityCreateAccessCheck implements AccessInterface {
protected $requirementsKey = '_entity_create_access';
/**
* Constructs a EntityCreateAccessCheck object.
* Constructs an EntityCreateAccessCheck object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager service.
......
......@@ -35,7 +35,7 @@ class EntityCreateAnyAccessCheck implements AccessInterface {
protected $requirementsKey = '_entity_create_any_access';
/**
* Constructs a EntityCreateAnyAccessCheck object.
* Constructs an EntityCreateAnyAccessCheck object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
......
......@@ -17,7 +17,7 @@ interface EntityTypeManagerInterface extends PluginManagerInterface, CachedDisco
* The entity type ID for this access control handler.
*
* @return \Drupal\Core\Entity\EntityAccessControlHandlerInterface
* A access control handler instance.
* An access control handler instance.
*/
public function getAccessControlHandler($entity_type_id);
......
......@@ -12,7 +12,7 @@
class NoCorrespondingEntityClassException extends \Exception {
/**
* Constructs an NoCorrespondingEntityClassException.
* Constructs a NoCorrespondingEntityClassException.
*
* @param string $class
* The class which does not correspond to an entity type.
......
......@@ -3,7 +3,7 @@
namespace Drupal\Core\Entity\Query;
/**
* Defines a interface for aggregated entity queries.
* Defines an interface for aggregated entity queries.
*/
interface QueryAggregateInterface extends QueryInterface {
......
......@@ -408,7 +408,7 @@ protected function addJoin($type, $table, $join_condition, $langcode, $delta = N
$entity_type_id = $this->sqlQuery->getMetaData('entity_type');
$entity_type = $this->entityTypeManager->getActiveDefinition($entity_type_id);
// Only the data table follows the entity language key, dedicated field
// tables have an hard-coded 'langcode' column.
// tables have a hard-coded 'langcode' column.
$langcode_key = $entity_type->getDataTable() == $table ? $entity_type->getKey('langcode') : 'langcode';
$placeholder = ':langcode' . $this->sqlQuery->nextPlaceholder();
$join_condition .= ' AND [%alias].[' . $langcode_key . '] = ' . $placeholder;
......
......@@ -475,7 +475,7 @@ public function getExtraColumns($table_name) {
}
/**
* Adds a extra columns for a table to the table mapping.
* Adds extra columns for a table to the table mapping.
*
* @param string $table_name
* The name of table to add the extra columns for.
......
......@@ -541,7 +541,7 @@
* @link container Services and Dependency Injection topic @endlink for more
* about how to properly retrieve services.
*
* To query to find entities to load, use an entity query, which is a object
* To query to find entities to load, use an entity query, which is an object
* implementing \Drupal\Core\Entity\Query\QueryInterface that you can retrieve
* with:
* @code
......
......@@ -99,7 +99,7 @@ public function onException(ExceptionEvent $event) {
if ($exception instanceof HttpExceptionInterface && (empty($handled_formats) || in_array($format, $handled_formats))) {
$method = 'on' . $exception->getStatusCode();
// Keep just the leading number of the status code to produce either a
// on400 or a 500 method callback.
// 400 or a 500 method callback.
$method_fallback = 'on' . substr($exception->getStatusCode(), 0, 1) . 'xx';
// We want to allow the method to be called and still not set a response
// if it has additional filtering logic to determine when it will apply.
......
......@@ -12,7 +12,7 @@
/**
* Handles options requests.
*
* Therefore it sends a options response using all methods on all possible
* Therefore it sends an options response using all methods on all possible
* routes.
*/
class OptionsRequestSubscriber implements EventSubscriberInterface {
......
......@@ -46,7 +46,7 @@ class ThemeHandler implements ThemeHandlerInterface {
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory to get the installed themes.
* @param \Drupal\Core\Extension\ThemeExtensionList $theme_list
* A extension discovery instance.
* An extension discovery instance.
*/
public function __construct($root, ConfigFactoryInterface $config_factory, ThemeExtensionList $theme_list) {
$this->root = $root;
......
......@@ -6,7 +6,7 @@
use Drupal\Core\Session\AccountInterface;
/**
* Defines a item list class for changed fields.
* Defines an item list class for changed fields.
*/
class ChangedFieldItemList extends FieldItemList {
......
......@@ -6,7 +6,7 @@
use Drupal\Core\Form\FormStateInterface;
/**
* Defines a item list class for entity reference fields.
* Defines an item list class for entity reference fields.
*/
class EntityReferenceFieldItemList extends FieldItemList implements EntityReferenceFieldItemListInterface {
......
......@@ -132,7 +132,7 @@ abstract class FieldConfigBase extends ConfigEntityBase implements FieldConfigIn
*
* This property is overlooked if the $default_value_callback is non-empty.
*
* Example for a integer field:
* Example for an integer field:
* @code
* array(
* array('value' => 1),
......
......@@ -56,7 +56,7 @@ public function getType();
*
* Each field type defines the settings that are meaningful for that type.
* For example, a text field can define a 'max_length' setting, and an image
* field can define a 'alt_field_required' setting.
* field can define an 'alt_field_required' setting.