Issue #2937858 by SherFengChong, Saviktor, longwave, jhodgdon, catch: Fix 'Drupal.Commenting.DocCommentAlignment' coding standard

merge-requests/501/head
Alex Pott 2021-04-03 14:25:04 +01:00
parent fd3efb7f6b
commit e3dfd1a9db
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
28 changed files with 78 additions and 77 deletions

View File

@ -14,7 +14,7 @@ namespace Drupal\Core\Ajax;
*
* This command is implemented by
* Drupal.AjaxCommands.prototype.update_build_id() defined in misc/ajax.js.
*O
*
* @ingroup ajax
*/
class UpdateBuildIdCommand implements CommandInterface {

View File

@ -46,8 +46,8 @@ class SiteSettingsForm extends FormBase {
}
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->getParameter('site.path'),

View File

@ -286,7 +286,7 @@ class DatabaseStorage extends StorageBase {
/**
* Defines the schema for the key_value table.
*/
*/
public static function schemaDefinition() {
return [
'description' => 'Generic key-value storage table. See the state system for an example.',

View File

@ -11,22 +11,22 @@ use Symfony\Component\Routing\RouteCollection;
interface FilterInterface {
/**
* Filters the route collection against a request and returns all matching
* routes.
*
* @param \Symfony\Component\Routing\RouteCollection $collection
* The collection against which to match.
* @param \Symfony\Component\HttpFoundation\Request $request
* A Request object against which to match.
*
* @return \Symfony\Component\Routing\RouteCollection
* A non-empty RouteCollection of matched routes
*
* @throws ResourceNotFoundException
* If none of the routes in $collection matches $request. This is a
* performance optimization to not continue the match process when a match
* will no longer be possible.
*/
* Filters the route collection against a request and returns all matching
* routes.
*
* @param \Symfony\Component\Routing\RouteCollection $collection
* The collection against which to match.
* @param \Symfony\Component\HttpFoundation\Request $request
* A Request object against which to match.
*
* @return \Symfony\Component\Routing\RouteCollection
* A non-empty RouteCollection of matched routes
*
* @throws ResourceNotFoundException
* If none of the routes in $collection matches $request. This is a
* performance optimization to not continue the match process when a match
* will no longer be possible.
*/
public function filter(RouteCollection $collection, Request $request);
}

View File

@ -16,7 +16,7 @@ use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
* field_types = {
* "datetime"
* }
*)
* )
*/
class DateTimeCustomFormatter extends DateTimeFormatterBase {

View File

@ -15,7 +15,7 @@ use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
* field_types = {
* "datetime"
* }
*)
* )
*/
class DateTimePlainFormatter extends DateTimeFormatterBase {

View File

@ -277,7 +277,7 @@ class DbLogTest extends BrowserTestBase {
* (optional) The log entry type.
* @param string $severity
* (optional) The log entry severity.
*/
*/
protected function filterLogsEntries($type = NULL, $severity = NULL) {
$edit = [];
if (isset($type)) {

View File

@ -282,8 +282,8 @@ class NumberFieldTest extends BrowserTestBase {
}
/**
* Test float field.
*/
* Test float field.
*/
public function testNumberFloatField() {
// Create a field with settings to validate.
$field_name = mb_strtolower($this->randomMachineName());

View File

@ -22,7 +22,7 @@ class DrupalSqlBaseTest extends MigrateTestCase {
/**
* @var \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
*/
*/
protected $base;
/**

View File

@ -13,8 +13,8 @@ use Drupal\migrate\Row;
class EntityNodeType extends EntityConfigBase {
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function import(Row $row, array $old_destination_id_values = []) {
$entity_ids = parent::import($row, $old_destination_id_values);
if ($row->getDestinationProperty('create_body')) {

View File

@ -3,10 +3,10 @@
namespace Drupal\Tests\options\Functional;
/**
* Tests the options allowed values api.
* Tests the options allowed values api.
*
* @group options
*/
*/
class OptionsDynamicValuesApiTest extends OptionsDynamicValuesTestBase {
/**

View File

@ -8,8 +8,8 @@
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_FORM_ID_alter().
*/
* Implements hook_form_FORM_ID_alter().
*/
function page_cache_form_test_form_page_cache_form_test_alter(&$form, FormStateInterface $form_state, $form_id) {
// This runs earlier than system_form_alter() so we fore-go the immutability
// check to the process callback, by which time system_form_alter() has run.

View File

@ -24,8 +24,8 @@ class DateTimeFieldRdfaTest extends FieldRdfaTestBase {
protected $testValue = '2014-01-28T06:01:01';
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
protected static $modules = ['datetime'];
protected function setUp(): void {

View File

@ -27,9 +27,9 @@ class Search extends FilterPluginBase {
/**
* A search query to use for parsing search keywords.
*
* @var \Drupal\search\ViewsSearchQuery
*/
*
* @var \Drupal\search\ViewsSearchQuery
*/
protected $searchQuery = NULL;
/**

View File

@ -12,10 +12,10 @@ use Symfony\Component\HttpFoundation\RequestStack;
class NodeStatisticsDatabaseStorage implements StatisticsStorageInterface {
/**
* The database connection used.
*
* @var \Drupal\Core\Database\Connection
*/
* The database connection used.
*
* @var \Drupal\Core\Database\Connection
*/
protected $connection;
/**

View File

@ -25,10 +25,10 @@ class SiteMaintenanceModeForm extends ConfigFormBase {
protected $state;
/**
* The permission handler.
*
* @var \Drupal\user\PermissionHandlerInterface
*/
* The permission handler.
*
* @var \Drupal\user\PermissionHandlerInterface
*/
protected $permissionHandler;
/**

View File

@ -16,10 +16,10 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class VocabularyVid extends NumericArgument {
/**
* The vocabulary storage.
*
* @var \Drupal\taxonomy\VocabularyStorageInterface
*/
* The vocabulary storage.
*
* @var \Drupal\taxonomy\VocabularyStorageInterface
*/
protected $vocabularyStorage;
/**

View File

@ -14,13 +14,13 @@ use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
class TrackerNodeTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
protected static $modules = ['tracker', 'migrate_drupal'];
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];

View File

@ -14,13 +14,13 @@ use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
class TrackerUserTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
protected static $modules = ['tracker', 'migrate_drupal'];
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];

View File

@ -274,8 +274,8 @@ class ExposedFormUITest extends UITestBase {
}
/**
* Tests the configuration of grouped exposed filters.
*/
* Tests the configuration of grouped exposed filters.
*/
public function testExposedGroupedFilter() {
// Click the Expose filter button.
$this->drupalPostForm('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type', [], 'Expose filter');

View File

@ -10,10 +10,10 @@ namespace Drupal\Tests\views_ui\Functional;
class UnsavedPreviewTest extends UITestBase {
/**
* Views used by this test.
*
* @var array
*/
* Views used by this test.
*
* @var array
*/
public static $testViews = ['content'];
/**

View File

@ -60,6 +60,7 @@
<exclude name="Drupal.Commenting.DocComment.ShortSingleLine"/>
<exclude name="Drupal.Commenting.DocComment.MissingShort"/>
</rule>
<rule ref="Drupal.Commenting.DocCommentAlignment"/>
<rule ref="Drupal.Commenting.DocCommentStar"/>
<rule ref="Drupal.Commenting.FileComment"/>
<rule ref="Drupal.Commenting.FunctionComment">

View File

@ -110,8 +110,8 @@ abstract class WebDriverTestBase extends BrowserTestBase {
}
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
protected function getMinkDriverArgs() {
if ($this->minkDefaultDriverClass === DrupalSelenium2Driver::class) {
return getenv('MINK_DRIVER_ARGS_WEBDRIVER') ?: parent::getMinkDriverArgs();

View File

@ -350,7 +350,7 @@ class KernelTestBaseTest extends KernelTestBase {
* Tests the deprecation of AssertLegacyTrait::assertIdenticalObject.
*
* @group legacy
*/
*/
public function testAssertIdenticalObject() {
$this->expectDeprecation('AssertLegacyTrait::assertIdenticalObject() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738');
$this->assertIdenticalObject((object) ['foo' => 'bar'], (object) ['foo' => 'bar']);
@ -360,7 +360,7 @@ class KernelTestBaseTest extends KernelTestBase {
* Tests the deprecation of AssertLegacyTrait::assertNotEqual.
*
* @group legacy
*/
*/
public function testAssertNotEqual() {
$this->expectDeprecation('AssertLegacyTrait::assertNotEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotEquals() instead. See https://www.drupal.org/node/3129738');
$this->assertNotEqual('foo', 'bar');
@ -370,7 +370,7 @@ class KernelTestBaseTest extends KernelTestBase {
* Tests the deprecation of AssertLegacyTrait::assertIdentical.
*
* @group legacy
*/
*/
public function testAssertIdentical() {
$this->expectDeprecation('AssertLegacyTrait::assertIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertSame() instead. See https://www.drupal.org/node/3129738');
$this->assertIdentical('foo', 'foo');
@ -380,7 +380,7 @@ class KernelTestBaseTest extends KernelTestBase {
* Tests the deprecation of AssertLegacyTrait::assertNotIdentical.
*
* @group legacy
*/
*/
public function testAssertNotIdentical() {
$this->expectDeprecation('AssertLegacyTrait::assertNotIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotSame() instead. See https://www.drupal.org/node/3129738');
$this->assertNotIdentical('foo', 'bar');
@ -390,7 +390,7 @@ class KernelTestBaseTest extends KernelTestBase {
* Tests the deprecation of AssertLegacyTrait::verbose().
*
* @group legacy
*/
*/
public function testVerbose() {
$this->expectDeprecation('AssertLegacyTrait::verbose() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead. See https://www.drupal.org/node/3197514');
$this->verbose('The show must go on');
@ -400,7 +400,7 @@ class KernelTestBaseTest extends KernelTestBase {
* Tests the deprecation of ::installSchema with the tables key_value(_expire).
*
* @group legacy
*/
*/
public function testKernelTestBaseInstallSchema() {
$this->expectDeprecation('Installing the tables key_value and key_value_expire with the method KernelTestBase::installSchema() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. The tables are now lazy loaded and therefore will be installed automatically when used. See https://www.drupal.org/node/3143286');
$this->enableModules(['system']);

View File

@ -341,7 +341,7 @@ abstract class BrowserTestBase extends TestCase {
* be overridden in a derived class so it is possible to use a different
* value for a subset of tests, e.g. the JavaScript tests.
*
* @return string|false
* @return string|false
* The JSON-encoded argument string. False if it is not set.
*/
protected function getMinkDriverArgs() {

View File

@ -37,8 +37,8 @@ class RouteProcessorCsrfTest extends UnitTestCase {
}
/**
* Tests the processOutbound() method with no _csrf_token route requirement.
*/
* Tests the processOutbound() method with no _csrf_token route requirement.
*/
public function testProcessOutboundNoRequirement() {
$this->csrfToken->expects($this->never())
->method('get');

View File

@ -16,7 +16,7 @@ class ExtensionInstallStorageTest extends UnitTestCase {
/**
* @covers ::createCollection
*/
*/
public function testCreateCollection() {
$memory = new MemoryStorage();
$include_profile = FALSE;

View File

@ -333,8 +333,8 @@ class EntityAdapterUnitTest extends UnitTestCase {
}
/**
* @covers ::getProperties
*/
* @covers ::getProperties
*/
public function testGetProperties() {
$fields = $this->entityAdapter->getProperties();
$this->assertInstanceOf('Drupal\Core\Field\FieldItemListInterface', $fields['id']);