Commit 82f25bf1 authored by Dries's avatar Dries

Issue #2168321 by longwave, martin107: Several files have incorrect indentation.

parent 5c29c0b4
......@@ -287,7 +287,7 @@ function _drupal_default_html_head() {
/**
* Retrieves output to be displayed in the HEAD tag of the HTML page.
*/
*/
function drupal_get_html_head() {
$elements = drupal_add_html_head();
\Drupal::moduleHandler()->alter('html_head', $elements);
......
<?php
/**
/**
* @file
* API functions for installing modules and themes.
*/
......
......@@ -205,35 +205,35 @@ function module_uninstall($module_list = array(), $uninstall_dependents = TRUE)
* @} End of "defgroup hooks".
*/
/**
* @defgroup callbacks Callbacks
* @{
* Callback function signatures.
*
* Drupal's API sometimes uses callback functions to allow you to define how
* some type of processing happens. A callback is a function with a defined
* signature, which you define in a module. Then you pass the function name as
* a parameter to a Drupal API function or return it as part of a hook
* implementation return value, and your function is called at an appropriate
* time. For instance, when setting up batch processing you might need to
* provide a callback function for each processing step and/or a callback for
* when processing is finished; you would do that by defining these functions
* and passing their names into the batch setup function.
*
* Callback function signatures, like hook definitions, are described by
* creating and documenting dummy functions in a *.api.php file; normally, the
* dummy callback function's name should start with "callback_", and you should
* document the parameters and return value and provide a sample function body.
* Then your API documentation can refer to this callback function in its
* documentation. A user of your API can usually name their callback function
* anything they want, although a standard name would be to replace "callback_"
* with the module name.
*
* @see hooks
* @see themeable
*
* @}
*/
/**
* @defgroup callbacks Callbacks
* @{
* Callback function signatures.
*
* Drupal's API sometimes uses callback functions to allow you to define how
* some type of processing happens. A callback is a function with a defined
* signature, which you define in a module. Then you pass the function name as
* a parameter to a Drupal API function or return it as part of a hook
* implementation return value, and your function is called at an appropriate
* time. For instance, when setting up batch processing you might need to
* provide a callback function for each processing step and/or a callback for
* when processing is finished; you would do that by defining these functions
* and passing their names into the batch setup function.
*
* Callback function signatures, like hook definitions, are described by
* creating and documenting dummy functions in a *.api.php file; normally, the
* dummy callback function's name should start with "callback_", and you should
* document the parameters and return value and provide a sample function body.
* Then your API documentation can refer to this callback function in its
* documentation. A user of your API can usually name their callback function
* anything they want, although a standard name would be to replace "callback_"
* with the module name.
*
* @see hooks
* @see themeable
*
* @}
*/
/**
* Returns an array of modules required by core.
......
......@@ -3,7 +3,7 @@
/**
* @file
* Contains \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator.
*/
*/
namespace Drupal\Component\Plugin\Discovery;
......
<?php
/**
* @file
* Definition of Drupal\Core\Plugin\Exception\InvalidDecoratedMethod.
*/
* @file
* Definition of Drupal\Core\Plugin\Exception\InvalidDecoratedMethod.
*/
namespace Drupal\Component\Plugin\Exception;
......
......@@ -228,9 +228,9 @@ public function isEmpty() {
public function garbageCollection() {
}
/**
* {@inheritdoc}
*/
/**
* {@inheritdoc}
*/
public function removeBin() {}
}
<?php
/**
* @file
* Contains \Drupal\Core\Config\ConfigImporterException.
*/
* @file
* Contains \Drupal\Core\Config\ConfigImporterException.
*/
namespace Drupal\Core\Config;
/**
* Exception thrown when a config import fails.
*/
* Exception thrown when a config import fails.
*/
class ConfigImporterException extends ConfigException {}
......@@ -124,15 +124,15 @@ class Merge extends Query implements ConditionInterface {
protected $needsUpdate = FALSE;
/**
* Constructs a Merge object.
*
* @param \Drupal\Core\Database\Connection $connection
* A Connection object.
* @param string $table
* Name of the table to associate with this query.
* @param array $options
* Array of database options.
*/
* Constructs a Merge object.
*
* @param \Drupal\Core\Database\Connection $connection
* A Connection object.
* @param string $table
* Name of the table to associate with this query.
* @param array $options
* Array of database options.
*/
public function __construct(Connection $connection, $table, array $options = array()) {
$options['return'] = Database::RETURN_AFFECTED;
parent::__construct($connection, $options);
......
......@@ -246,14 +246,14 @@ function __get($name) {
}
/**
* Changes backslashes to slashes, also removes a trailing slash.
*
* @param string $path
* The path to modify.
*
* @return string
* The modified path.
*/
* Changes backslashes to slashes, also removes a trailing slash.
*
* @param string $path
* The path to modify.
*
* @return string
* The modified path.
*/
function sanitizePath($path) {
$path = str_replace('\\', '/', $path); // Windows path sanitization.
if (substr($path, -1) == '/') {
......
......@@ -27,10 +27,10 @@ class CountryManager implements CountryManagerInterface {
protected $countries;
/*
* Constructor.
*
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
*/
* Constructor.
*
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
*/
public function __construct(ModuleHandlerInterface $module_handler) {
$this->moduleHandler = $module_handler;
}
......
......@@ -35,12 +35,12 @@ public function getRouteName();
*/
public function getRouteParameters(Request $request);
/**
* Returns the weight for the local action.
*
* @return int
*/
public function getWeight();
/**
* Returns the weight for the local action.
*
* @return int
*/
public function getWeight();
/**
* Returns options for rendering a link for the local action.
......
......@@ -3,7 +3,7 @@
/**
* @file
* Definition of Drupal\Core\Plugin\Discovery\AlterDiscoveryDecorator.
*/
*/
namespace Drupal\Core\Plugin\Discovery;
......
......@@ -66,7 +66,7 @@ public function getUntranslated();
*
* @return bool
* TRUE if the translation exists, FALSE otherwise.
*/
*/
public function hasTranslation($langcode);
/**
......
......@@ -5,7 +5,7 @@
* Provides an HTTP Basic authentication provider.
*/
/**
/**
* Implements hook_help().
*/
function basic_auth_help($path, $arg) {
......
......@@ -40,7 +40,7 @@ class ConfigTranslationController extends ControllerBase {
*/
protected $accessManager;
/**
/**
* The dynamic router service.
*
* @var \Symfony\Component\Routing\Matcher\RequestMatcherInterface
......
{#
/**
* @file
* Default theme implementation for a form element in config_translation.
*
* Available variables:
* - element: Array that represents the element shown in the form.
* - source: The source of the translation.
* - translation: The translation for the target language.
*
* @see template_preprocess()
* @see template_preprocess_config_translation_manage_form_element()
*
* @ingroup themeable
*/
* @file
* Default theme implementation for a form element in config_translation.
*
* Available variables:
* - element: Array that represents the element shown in the form.
* - source: The source of the translation.
* - translation: The translation for the target language.
*
* @see template_preprocess()
* @see template_preprocess_config_translation_manage_form_element()
*
* @ingroup themeable
*/
#}
<div class="clearfix translation-element-wrapper">
<div class="source">
......
......@@ -279,8 +279,8 @@ function testSiteWideContact() {
}
/**
* Tests auto-reply on the site-wide contact form.
*/
* Tests auto-reply on the site-wide contact form.
*/
function testAutoReply() {
// Create and login administrative user.
$admin_user = $this->drupalCreateUser(array('access site-wide contact form', 'administer contact forms', 'administer permissions', 'administer users'));
......
......@@ -15,10 +15,10 @@
class FilePrivateTest extends FileFieldTestBase {
/**
* Modules to enable.
*
* @var array
*/
* Modules to enable.
*
* @var array
*/
public static $modules = array('node_access_test', 'field_test');
public static function getInfo() {
......
......@@ -38,6 +38,6 @@ function hook_image_style_flush($style) {
\Drupal::cache('mymodule')->deleteAll();
}
/**
* @} End of "addtogroup hooks".
*/
/**
* @} End of "addtogroup hooks".
*/
......@@ -80,7 +80,7 @@ public function isSource() {
/**
* Implements Drupal\locale\StringInterface::isTranslation().
*/
*/
public function isTranslation() {
return !empty($this->lid) && !empty($this->language) && isset($this->translation);
}
......
......@@ -32,7 +32,7 @@
* Optional, defaults to TRUE.
* @param array $context
* The batch context.
*/
*/
function locale_translation_batch_status_check($project, $langcode, $options = array(), &$context) {
$failure = $checked = FALSE;
$options += array(
......
......@@ -41,8 +41,8 @@ public function buildOptionsForm(&$form, &$form_state) {
}
/**
* Render node type as human readable name, unless using machine_name option.
*/
* Render node type as human readable name, unless using machine_name option.
*/
function render_name($data, $values) {
if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
$type = entity_load('node_type', $data);
......
......@@ -20,9 +20,9 @@ public static function getInfo() {
);
}
/**
* Ensures that content array is rebuilt on every call to node_build_content().
*/
/**
* Ensures that content array is rebuilt on every call to node_build_content().
*/
function testNodeRebuildContent() {
$node = $this->drupalCreateNode();
......
......@@ -21,7 +21,7 @@ class OptionsWidgetsTest extends FieldTestBase {
*/
public static $modules = array('node', 'options', 'entity_test', 'options_test', 'taxonomy', 'field_ui');
/**
/**
* A field with cardinality 1 to use in this test class.
*
* @var \Drupal\field\Entity\FieldConfig
......
......@@ -19,7 +19,7 @@
*/
class MetadataGenerator implements MetadataGeneratorInterface {
/**
/**
* An object that checks if a user has access to edit a given entity field.
*
* @var \Drupal\quickedit\Access\EditEntityFieldAccessCheckInterface
......
......@@ -33,8 +33,8 @@ class TextFieldRdfaTest extends FieldRdfaTestBase {
protected $testSummary = 'test_summary_value';
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public static $modules = array('text');
public static function getInfo() {
......
......@@ -87,7 +87,7 @@ public function getRouteParams();
*
* @return \Drupal\shortcut\ShortcutInterface
* The called shortcut entity.
*/
*/
public function setRouteParams($route_parameters);
}
......@@ -41,7 +41,7 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A
}
/**
* {@inheritdoc}
* {@inheritdoc}
*/
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return $account->hasPermission('administer shortcuts') || $account->hasPermission('customize shortcut links');
......
......@@ -285,8 +285,8 @@ table.system-status-report .status-title {
}
/**
* Theme display without vertical toolbar.
*/
* Theme display without vertical toolbar.
*/
@media screen and (min-width: 45em) {
body:not(.toolbar-vertical) .system-themes-list-enabled .screenshot,
body:not(.toolbar-vertical) .system-themes-list-enabled .no-screenshot {
......@@ -320,8 +320,8 @@ table.system-status-report .status-title {
}
/**
* Theme display with vertical toolbar.
*/
* Theme display with vertical toolbar.
*/
@media screen and (min-width: 60em) {
.toolbar-vertical .system-themes-list-enabled .screenshot,
.toolbar-vertical .system-themes-list-enabled .no-screenshot {
......
......@@ -266,7 +266,7 @@ body div.tabledrag-changed-warning {
* TableSelect behavior.
*
* @see tableselect.js
*/
*/
tr.selected td {
background: #ffc;
}
......
......@@ -103,51 +103,51 @@ protected function assertCRUD($entity_type, UserInterface $user1) {
}
}
/**
* Tests that exceptions are properly thrown when saving or deleting an
* entity.
*/
public function testEntityStorageExceptionHandling() {
$entity = entity_create('entity_test', array('name' => 'test'));
try {
$GLOBALS['entity_test_throw_exception'] = TRUE;
$entity->save();
$this->fail('Entity presave EntityStorageException thrown but not caught.');
}
catch (EntityStorageException $e) {
$this->assertEqual($e->getcode(), 1, 'Entity presave EntityStorageException caught.');
}
$entity = entity_create('entity_test', array('name' => 'test2'));
try {
unset($GLOBALS['entity_test_throw_exception']);
$entity->save();
$this->pass('Exception presave not thrown and not caught.');
}
catch (EntityStorageException $e) {
$this->assertNotEqual($e->getCode(), 1, 'Entity presave EntityStorageException caught.');
}
$entity = entity_create('entity_test', array('name' => 'test3'));
$entity->save();
try {
$GLOBALS['entity_test_throw_exception'] = TRUE;
$entity->delete();
$this->fail('Entity predelete EntityStorageException not thrown.');
}
catch (EntityStorageException $e) {
$this->assertEqual($e->getCode(), 2, 'Entity predelete EntityStorageException caught.');
}
unset($GLOBALS['entity_test_throw_exception']);
$entity = entity_create('entity_test', array('name' => 'test4'));
$entity->save();
try {
$entity->delete();
$this->pass('Entity predelete EntityStorageException not thrown and not caught.');
}
catch (EntityStorageException $e) {
$this->assertNotEqual($e->getCode(), 2, 'Entity predelete EntityStorageException thrown.');
}
}
/**
* Tests that exceptions are properly thrown when saving or deleting an
* entity.
*/
public function testEntityStorageExceptionHandling() {
$entity = entity_create('entity_test', array('name' => 'test'));
try {
$GLOBALS['entity_test_throw_exception'] = TRUE;
$entity->save();
$this->fail('Entity presave EntityStorageException thrown but not caught.');
}
catch (EntityStorageException $e) {
$this->assertEqual($e->getcode(), 1, 'Entity presave EntityStorageException caught.');
}
$entity = entity_create('entity_test', array('name' => 'test2'));
try {
unset($GLOBALS['entity_test_throw_exception']);
$entity->save();
$this->pass('Exception presave not thrown and not caught.');
}
catch (EntityStorageException $e) {
$this->assertNotEqual($e->getCode(), 1, 'Entity presave EntityStorageException caught.');
}
$entity = entity_create('entity_test', array('name' => 'test3'));
$entity->save();
try {
$GLOBALS['entity_test_throw_exception'] = TRUE;
$entity->delete();
$this->fail('Entity predelete EntityStorageException not thrown.');
}
catch (EntityStorageException $e) {
$this->assertEqual($e->getCode(), 2, 'Entity predelete EntityStorageException caught.');
}
unset($GLOBALS['entity_test_throw_exception']);
$entity = entity_create('entity_test', array('name' => 'test4'));
$entity->save();
try {
$entity->delete();
$this->pass('Entity predelete EntityStorageException not thrown and not caught.');
}
catch (EntityStorageException $e) {
$this->assertNotEqual($e->getCode(), 2, 'Entity predelete EntityStorageException thrown.');
}
}
}
......@@ -200,7 +200,7 @@ function testPatternValidation() {
$this->assertNoRaw(t('%name field is not in the right format.', array('%name' => 'Client side validation')));
}
/**
/**
* Tests #required with custom validation errors.
*
* @see form_test_validate_required_form()
......
......@@ -29,7 +29,7 @@
*/
const DRUPAL_USER_TIMEZONE_SELECT = 2;
/**
/**
* Disabled option on forms and settings
*/
const DRUPAL_DISABLED = 0;
......
......@@ -263,7 +263,7 @@ function taxonomy_term_view(Term $term, $view_mode = 'full', $langcode = NULL) {
return entity_view($term, $view_mode, $langcode);
}
/**
/**
* Constructs a drupal_render() style array from an array of loaded terms.
*
* @param array $terms
......
......@@ -86,7 +86,7 @@ div.password-suggestions ul {
clear: right;
}
/**
/**
* Password strength indicator on narrow viewport.
*/
@media screen and (max-width: 600px) {
......
......@@ -127,9 +127,9 @@ public function getResetURL() {
return $urls[0];
}
/**
* Prefill the text box on incorrect login via link to password reset page.
*/
/**
* Prefill the text box on incorrect login via link to password reset page.
*/
public function testUserResetPasswordTextboxFilled() {
$this->drupalGet('user/login');
$edit = array(
......
......@@ -162,7 +162,7 @@ function testValidation() {
* The field that violates the maximum length.
* @param int $length
* Number of characters that was exceeded.
*/
*/
protected function assertLengthViolation(EntityInterface $entity, $field_name, $length) {
$violations = $entity->validate();
$this->assertEqual(count($violations), 1, "Violation found when $field_name is too long.");
......
......@@ -828,7 +828,7 @@ function user_pass_reset_url($account, $options = array()) {
* @param array $options
* (optional) A keyed array of settings. Supported options are:
* - langcode: A language code to be used when generating locale-sensitive
* URLs. If langcode is NULL the users preferred language is used.
* URLs. If langcode is NULL the users preferred language is used.
*
* @return
* A unique URL that may be used to confirm the cancellation of the user
......
......@@ -45,7 +45,7 @@ class ViewsHandlerManager extends DefaultPluginManager {
* An object that implements \Traversable which contains the root paths
* keyed by the corresponding namespace to look for plugin implementations,
* @param \Drupal\views\ViewsData $views_data
* The views data cache.
* The views data cache.
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
* Cache backend instance to use.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
......
......@@ -72,7 +72,7 @@ abstract class PluginBase extends ComponentPluginBase implements ContainerFactor
*/
public $definition;
/**
/**
* Denotes whether the plugin has an additional options form.
*
* @var bool
......
......@@ -28,10 +28,10 @@ class View extends AreaPluginBase {
protected $isEmpty;
/**
* The view storage.
*
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
* The view storage.
*
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $viewStorage;
/**
......
......@@ -105,15 +105,15 @@ public function summaryTitle() {
protected function cacheExpire($type) {
}
/**
* Determine expiration time in the cache table of the cache type
* or CACHE_PERMANENT if item shouldn't be removed automatically from cache.
*
* Plugins must override this to implement expiration in the cache table.
*
* @param $type
* The cache type, either 'query', 'result' or 'output'.
*/
/**
* Determine expiration time in the cache table of the cache type
* or CACHE_PERMANENT if item shouldn't be removed automatically from cache.
*
* Plugins must override this to implement expiration in the cache table.
*
* @param $type
* The cache type, either 'query', 'result' or 'output'.
*/
protected function cacheSetExpire($type) {
return Cache::PERMANENT;
}
......
......@@ -2346,33 +2346,33 @@ public function isIdentifierUnique($id, $identifier) {
return TRUE;
}
/**