Commit 70f58860 authored by alexpott's avatar alexpott

Issue #2716685 by Mile23: Part 2: Fix several errors in the...

Issue #2716685 by Mile23: Part 2: Fix several errors in the 'Drupal.Commenting.DocComment' coding standard
parent c26745da
......@@ -220,7 +220,6 @@ function valid_email_address($mail) {
* UrlHelper::filterBadProtocol() is functionality equivalent to check_url()
* apart from the fact it is protected from double escaping bugs. Note that
* this method no longer marks its output as safe.
*
*/
function check_url($uri) {
return Html::escape(UrlHelper::stripDangerousProtocols($uri));
......
......@@ -313,7 +313,6 @@ function template_preprocess_checkboxes(&$variables) {
* An associative array containing:
* - element: An associative array containing the properties and children of
* the details element. Properties used: #children.
*
*/
function template_preprocess_vertical_tabs(&$variables) {
$element = $variables['element'];
......@@ -372,7 +371,6 @@ function template_preprocess_form(&$variables) {
* - element: An associative array containing the properties of the element.
* Properties used: #title, #value, #description, #rows, #cols,
* #placeholder, #required, #attributes, #resizable
*
*/
function template_preprocess_textarea(&$variables) {
$element = $variables['element'];
......
......@@ -1372,7 +1372,7 @@ function install_retrieve_file($uri, $destination) {
}
/**
* Checks if the localization server can be contacted.
* Checks if the localization server can be contacted.
*
* @param string $uri
* The URI to contact.
......
......@@ -5,8 +5,7 @@
use Drupal\Component\Utility\Unicode;
/**
* Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3
*
* Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3
*/
/**
......
......@@ -21,15 +21,12 @@ class MappedDiff extends Diff {
*
* @param $from_lines array An array of strings.
* (Typically these are lines from a file.)
*
* @param $to_lines array An array of strings.
*
* @param $mapped_from_lines array This array should
* have the same size number of elements as $from_lines.
* The elements in $mapped_from_lines and
* $mapped_to_lines are what is actually compared
* when computing the diff.
*
* @param $mapped_to_lines array This array should
* have the same number of elements as $to_lines.
*/
......
......@@ -7,6 +7,5 @@
/**
* Exception thrown when a decorator's _call() method is triggered, but the
* decorated object does not contain the requested method.
*
*/
class InvalidDecoratedMethod extends BadMethodCallException implements ExceptionInterface { }
......@@ -71,7 +71,6 @@ public function createInstance($plugin_id, array $configuration = array()) {
* @throws \Drupal\Component\Plugin\Exception\PluginException
* Thrown when there is no class specified, the class doesn't exist, or
* the class does not implement the specified required interface.
*
*/
public static function getPluginClass($plugin_id, $plugin_definition = NULL, $required_interface = NULL) {
$missing_class_message = sprintf('The plugin (%s) did not specify an instance class.', $plugin_id);
......
......@@ -116,7 +116,6 @@ public static function filter($string, array $html_tags = NULL) {
* @ingroup sanitization
*
* @see \Drupal\Component\Utility\Xss::getAdminTagList()
*
*/
public static function filterAdmin($string) {
return static::filter($string, static::$adminTags);
......
......@@ -29,7 +29,6 @@ class RemoveCommand implements CommandInterface {
* Constructs a RemoveCommand object.
*
* @param string $selector
*
*/
public function __construct($selector) {
$this->selector = $selector;
......
......@@ -6,7 +6,6 @@
* Defines a generic class for passing cacheability metadata.
*
* @ingroup cache
*
*/
class CacheableMetadata implements RefinableCacheableDependencyInterface {
......
......@@ -98,7 +98,6 @@ public function getLabels($include_calculated_cache_contexts = FALSE) {
* @return \Drupal\Core\Cache\Context\ContextCacheKeys
* The ContextCacheKeys object containing the converted cache keys and
* cacheability metadata.
*
*/
public function convertTokensToKeys(array $context_tokens) {
assert('$this->assertValidTokens($context_tokens)');
......
......@@ -9,7 +9,6 @@
* many times a cache entry was set or requested.
*
* @todo On the longrun this backend should be replaced by phpunit mock objects.
*
*/
class MemoryCounterBackend extends MemoryBackend {
......@@ -49,7 +48,6 @@ public function delete($cid) {
*
* @param string $function
* The called function.
*
* @param string $cid
* The cache ID of the cache entry to increase the counter.
*/
......
......@@ -46,7 +46,6 @@ class ControllerResolver extends BaseControllerResolver implements ControllerRes
*
* @param \Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface $http_message_factory
* The PSR-7 converter.
*
* @param \Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver
* The class resolver.
*/
......
......@@ -24,7 +24,6 @@ class DrupalDateTime extends DateTimePlus {
/**
* Format string translation cache.
*
*/
protected $formatTranslationCache;
......
......@@ -357,7 +357,6 @@ protected static function checkEmptyInputs($input, $parts) {
* Rounds minutes and seconds to nearest requested value.
*
* @param $date
*
* @param $increment
*
* @return
......
......@@ -28,7 +28,6 @@ class QueryFactory implements QueryFactoryInterface {
/**
* Constructs a QueryFactory object.
*
*/
public function __construct(KeyValueFactoryInterface $key_value_factory) {
$this->keyValueFactory = $key_value_factory;
......
......@@ -48,7 +48,6 @@ public function groupBy($field);
* The aggregation function, for example COUNT or MIN.
* @param mixed $value
* The actual value of the field.
*
* @param $operator
* Possible values:
* - '=', '<>', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS',
......@@ -58,7 +57,6 @@ public function groupBy($field);
* literals of the same type as the column.
* - 'BETWEEN': This operator expects $value to be an array of two literals
* of the same type as the column.
*
* @param string $langcode
* (optional) The language code.
*
......
......@@ -16,7 +16,6 @@
* $settings['extension_discovery_scan_tests'] = TRUE;
* @encode
* to your settings.php.
*
*/
class ExtensionDiscovery {
......
......@@ -54,7 +54,7 @@ class ThemeHandler implements ThemeHandlerInterface {
protected $state;
/**
* The config installer to install configuration.
* The config installer to install configuration.
*
* @var \Drupal\Core\Config\ConfigInstallerInterface
*/
......
......@@ -348,20 +348,20 @@ class FormState implements FormStateInterface {
protected $groups = array();
/**
* This is not a special key, and no specific support is provided for it in
* the Form API. By tradition it was the location where application-specific
* data was stored for communication between the submit, validation, and form
* builder functions, especially in a multi-step-style form. Form
* implementations may use any key(s) within $form_state (other than the keys
* listed here and other reserved ones used by Form API internals) for this
* kind of storage. The recommended way to ensure that the chosen key doesn't
* conflict with ones used by the Form API or other modules is to use the
* module name as the key name or a prefix for the key name. For example, the
* entity form classes use $this->entity in entity forms, or
* $form_state->getFormObject()->getEntity() outside the controller, to store
* information about the entity being edited, and this information stays
* available across successive clicks of the "Preview" button (if available)
* as well as when the "Save" button is finally clicked.
* This is not a special key, and no specific support is provided for it in
* the Form API. By tradition it was the location where application-specific
* data was stored for communication between the submit, validation, and form
* builder functions, especially in a multi-step-style form. Form
* implementations may use any key(s) within $form_state (other than the keys
* listed here and other reserved ones used by Form API internals) for this
* kind of storage. The recommended way to ensure that the chosen key doesn't
* conflict with ones used by the Form API or other modules is to use the
* module name as the key name or a prefix for the key name. For example, the
* entity form classes use $this->entity in entity forms, or
* $form_state->getFormObject()->getEntity() outside the controller, to store
* information about the entity being edited, and this information stays
* available across successive clicks of the "Preview" button (if available)
* as well as when the "Save" button is finally clicked.
*
* @var array
*/
......
......@@ -1097,7 +1097,6 @@ protected function doBuildTreeData(array $links, array $parents = array(), $dept
* is an associative array of information about the menu link, containing
* the fields from the $this->table. This array must be ordered
* depth-first. MenuTreeStorage::loadTreeData() includes a sample query.
*
* @param array $parents
* An array of the menu link ID values that are in the path from the current
* page to the root of the menu tree.
......
......@@ -32,7 +32,6 @@ public function resetDefinitions();
*
* @param array $definitions
* The new menu link definitions.
*
*/
public function rebuild(array $definitions);
......
......@@ -47,7 +47,6 @@ class AdminPathConfigEntityConverter extends EntityConverter {
* The config factory.
* @param \Drupal\Core\Routing\AdminContext $admin_context
* The route admin context service.
*
*/
public function __construct(EntityManagerInterface $entity_manager, ConfigFactoryInterface $config_factory, AdminContext $admin_context) {
parent::__construct($entity_manager);
......
......@@ -42,7 +42,6 @@ class AliasStorage implements AliasStorageInterface {
*
* @param \Drupal\Core\Database\Connection $connection
* A database connection for reading and writing path aliases.
*
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
*/
......
......@@ -63,7 +63,7 @@ class UrlGenerator implements UrlGeneratorInterface {
];
/**
* Constructs a new generator object.
* Constructs a new generator object.
*
* @param \Drupal\Core\Routing\RouteProviderInterface $provider
* The route provider to be searched for routes.
......
......@@ -30,7 +30,6 @@ class KernelPreHandle implements HttpKernelInterface {
*
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel
* The wrapped HTTP kernel.
*
* @param \Drupal\Core\DrupalKernelInterface $drupal_kernel
* The main Drupal kernel.
*/
......
......@@ -29,7 +29,7 @@ class UnroutedUrlAssembler implements UnroutedUrlAssemblerInterface {
protected $pathProcessor;
/**
* Constructs a new unroutedUrlAssembler object.
* Constructs a new unroutedUrlAssembler object.
*
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* A request stack object.
......
......@@ -2,7 +2,7 @@
/**
* @file
* Provide test blocks.
* Provide test blocks.
*/
use Drupal\Core\Block\BlockPluginInterface;
......
......@@ -11,7 +11,6 @@
* id = "baloney_spam",
* label = @Translation("Baloney spam"),
* )
*
*/
class BaloneySpam extends ConditionPluginBase {
......
......@@ -1045,7 +1045,6 @@ protected function buildBookOutlineData(array $links, array $parents = array(),
*
* @return array
* Book tree.
*
*/
protected function buildBookOutlineRecursive(&$links, $parents, $depth) {
$tree = array();
......
......@@ -81,7 +81,6 @@ public function loadBookLink($nid, $translate = TRUE);
*
* @param int[] $nids
* An array of nids to load.
*
* @param bool $translate
* If TRUE, set access, title, and other elements.
*
......
......@@ -49,7 +49,6 @@ public function loadMultiple($nids, $access = TRUE);
*
* @param array $book_link
* The book link.
*
* @param int $max_depth
* The maximum supported depth of the book tree.
*
......
......@@ -71,7 +71,6 @@ public static function create(ContainerInterface $container) {
*
* @return array
* A render array representing the administrative page content.
*
*/
public function adminOverview() {
$rows = array();
......
......@@ -74,7 +74,6 @@ public function setEnabled($entity_type_id, $bundle, $value);
* @returns bool
* TRUE if the specified bundle is translatable. If no bundle is provided
* returns TRUE if at least one of the entity bundles is translatable.
*
*/
public function isEnabled($entity_type_id, $bundle = NULL);
......
......@@ -50,7 +50,6 @@ function datetime_help($route_name, RouteMatchInterface $route_match) {
* same value for in both the local timezone and UTC.
*
* @param $date
*
*/
function datetime_date_default_time($date) {
$date->setTime(12, 0, 0);
......
......@@ -100,7 +100,7 @@ protected function _testOffset() {
}
/**
* Test between operations.
* Test between operations.
*/
protected function _testBetween() {
$view = Views::getView('test_filter_datetime');
......
......@@ -234,7 +234,6 @@ public function overview() {
* @return array
* If the ID is located in the Database Logging table, a build array in the
* format expected by drupal_render();
*
*/
public function eventDetails($event_id) {
$build = array();
......
......@@ -113,7 +113,7 @@ public function testEntityDisplayCRUD() {
}
/**
* Test sorting of components by name on basic CRUD operations
* Test sorting of components by name on basic CRUD operations
*/
public function testEntityDisplayCRUDSort() {
$display = EntityViewDisplay::create(array(
......
......@@ -64,7 +64,6 @@ public function delete(FileInterface $file, $module, $type = NULL, $id = NULL, $
* A nested array with usage data. The first level is keyed by module name,
* the second by object type and the third by the object id. The value of
* the third level contains the usage count.
*
*/
public function listUsage(FileInterface $file);
}
......@@ -51,7 +51,7 @@ function testFileValidateExtensions() {
}
/**
* This ensures a specific file is actually an image.
* This ensures a specific file is actually an image.
*/
function testFileValidateIsImage() {
$this->assertTrue(file_exists($this->image->getFileUri()), 'The image being tested exists.', 'File');
......@@ -64,8 +64,9 @@ function testFileValidateIsImage() {
}
/**
* This ensures the resolution of a specific file is within bounds.
* The image will be resized if it's too large.
* This ensures the resolution of a specific file is within bounds.
*
* The image will be resized if it's too large.
*/
function testFileValidateImageResolution() {
// Non-images.
......@@ -113,7 +114,7 @@ function testFileValidateImageResolution() {
}
/**
* This will ensure the filename length is valid.
* This will ensure the filename length is valid.
*/
function testFileValidateNameLength() {
// Create a new file entity.
......
......@@ -215,7 +215,6 @@ protected function getEntityUri(EntityInterface $entity) {
*
* @return array
* The typed data IDs.
*
*/
protected function getTypedDataIds($types, $context = array()) {
// The 'type' can potentially contain an array of type objects. By default,
......
......@@ -19,7 +19,6 @@
* "language" = @ContextDefinition("language", label = @Translation("Language"))
* }
* )
*
*/
class Language extends ConditionPluginBase implements ContainerFactoryPluginInterface {
......
......@@ -49,7 +49,6 @@ function menu_link_content_path_insert($path) {
*
* @param string $path
* The path alias.
*
*/
function _menu_link_content_update_path_alias($path) {
/** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
......
......@@ -43,7 +43,6 @@ class MenuLinkContentDeriver extends DeriverBase implements ContainerDeriverInte
*
* @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
* The query factory.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager
......
......@@ -217,7 +217,7 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
protected $migrationPluginManager;
/**
* The source plugin manager.
* The source plugin manager.
*
* @var \Drupal\migrate\Plugin\MigratePluginManager
*/
......
......@@ -18,7 +18,6 @@
* "node" = @ContextDefinition("entity:node", label = @Translation("Node"))
* }
* )
*
*/
class NodeType extends ConditionPluginBase implements ContainerFactoryPluginInterface {
......
......@@ -35,7 +35,6 @@ class Node extends ArgumentDefaultPluginBase implements CacheableDependencyInter
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
*
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match.
*/
......
......@@ -41,7 +41,7 @@ protected function setUp() {
}
/**
* Creates one node and tests if the node title has the correct value.
* Creates one node and tests if the node title has the correct value.
*/
function testNodeTitle() {
// Create "Basic page" content with title.
......
......@@ -35,6 +35,7 @@ protected function setUp() {
* Tests a single node type.
*
* @dataProvider testNodeTypeDataProvider
*
* @param string $id
* The node type ID.
* @param string $label
......
......@@ -18,7 +18,6 @@
* \Drupal\Core\TypedData\OptionsProviderInterface::getSettableOptions(). An
* empty option (_none) might have been added, depending on the field
* properties.
*
* @param array $context
* An associative array containing:
* - field_definition: The field definition
......
......@@ -127,7 +127,6 @@ public function testResolverWithResolvedToZero() {
*
* @param null|int $return
* Whether the mocked resolve method should return TRUE or FALSE.
*
* @param bool $called
* Whether or not the resolve method is expected to be called.
*
......
......@@ -53,7 +53,6 @@ public function testLibrariesAvailable() {
* When called with ajax_page_state[libraries]=core/html5shiv the library
* should be excluded as it is already loaded. This should not affect other
* libraries so test if drupalSettings is still available.
*
*/
public function testHtml5ShivIsNotLoaded() {
$this->drupalGet('node',
......@@ -82,7 +81,6 @@ public function testHtml5ShivIsNotLoaded() {
*
* ajax_page_state[libraries] should be able to support multiple libraries
* comma separated.
*
*/
public function testMultipleLibrariesAreNotLoaded() {
$this->drupalGet('node',
......
......@@ -5,7 +5,7 @@
use Drupal\simpletest\WebTestBase;
/**
* Test SimplePageVariant main content rendering fallback page display variant.
* Test SimplePageVariant main content rendering fallback page display variant.
*
* @group system
*/
......
......@@ -210,7 +210,6 @@ function common_test_library_info_alter(&$libraries, $module) {
* cron going.
*
* @see common_test_cron_helper()
*
*/
function common_test_cron() {
throw new Exception(t('Uncaught exception'));
......
......@@ -48,7 +48,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
/**
* Implements \Drupal\Core\Form\FormInterface::validateForm().
*
*/
public function validateForm(array &$form, FormStateInterface $form_state) {
$this->condition->validateConfigurationForm($form, $form_state);
......
......@@ -337,7 +337,7 @@ function testSubtreesJsonRequest() {
}
/**
* Test that subtrees hashes vary by the language of the page.
* Test that subtrees hashes vary by the language of the page.
*/
function testLanguageSwitching() {
// Create a new language with the langcode 'xx'.
......
......@@ -375,7 +375,6 @@ function update_get_available($refresh = FALSE) {
* project.
*
* @see \Drupal\update\UpdateFetcher::createFetchTask()
*
*/
function update_create_fetch_task($project) {
\Drupal::service('update.processor')->createFetchTask($project);
......
......@@ -15,7 +15,6 @@
* "user" = @ContextDefinition("entity:user", label = @Translation("User"))
* }
* )
*
*/
class UserRole extends ConditionPluginBase {
......
......@@ -19,7 +19,6 @@ class ConvertTokens extends ProcessPluginBase {
/**
* {@inheritdoc}
*
*/
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
$tokens = array(
......
......@@ -261,7 +261,6 @@ function user_load_by_name($name) {
* @return string|null
* A translated violation message if the name is invalid or NULL if the name
* is valid.
*
*/
function user_validate_name($name) {
$definition = BaseFieldDefinition::create('string')
......
......@@ -17,7 +17,6 @@
* definition terms: