Unverified Commit e3dfd1a9 authored by alexpott's avatar alexpott
Browse files

Issue #2937858 by SherFengChong, Saviktor, longwave, jhodgdon, catch: Fix...

Issue #2937858 by SherFengChong, Saviktor, longwave, jhodgdon, catch: Fix 'Drupal.Commenting.DocCommentAlignment' coding standard
parent fd3efb7f
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* *
* This command is implemented by * This command is implemented by
* Drupal.AjaxCommands.prototype.update_build_id() defined in misc/ajax.js. * Drupal.AjaxCommands.prototype.update_build_id() defined in misc/ajax.js.
*O *
* @ingroup ajax * @ingroup ajax
*/ */
class UpdateBuildIdCommand implements CommandInterface { class UpdateBuildIdCommand implements CommandInterface {
......
...@@ -46,8 +46,8 @@ public function __construct($site_path, RendererInterface $renderer) { ...@@ -46,8 +46,8 @@ public function __construct($site_path, RendererInterface $renderer) {
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static function create(ContainerInterface $container) { public static function create(ContainerInterface $container) {
return new static( return new static(
$container->getParameter('site.path'), $container->getParameter('site.path'),
......
...@@ -286,7 +286,7 @@ protected function catchException(\Exception $e) { ...@@ -286,7 +286,7 @@ protected function catchException(\Exception $e) {
/** /**
* Defines the schema for the key_value table. * Defines the schema for the key_value table.
*/ */
public static function schemaDefinition() { public static function schemaDefinition() {
return [ return [
'description' => 'Generic key-value storage table. See the state system for an example.', 'description' => 'Generic key-value storage table. See the state system for an example.',
......
...@@ -11,22 +11,22 @@ ...@@ -11,22 +11,22 @@
interface FilterInterface { interface FilterInterface {
/** /**
* Filters the route collection against a request and returns all matching * Filters the route collection against a request and returns all matching
* routes. * routes.
* *
* @param \Symfony\Component\Routing\RouteCollection $collection * @param \Symfony\Component\Routing\RouteCollection $collection
* The collection against which to match. * The collection against which to match.
* @param \Symfony\Component\HttpFoundation\Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* A Request object against which to match. * A Request object against which to match.
* *
* @return \Symfony\Component\Routing\RouteCollection * @return \Symfony\Component\Routing\RouteCollection
* A non-empty RouteCollection of matched routes * A non-empty RouteCollection of matched routes
* *
* @throws ResourceNotFoundException * @throws ResourceNotFoundException
* If none of the routes in $collection matches $request. This is a * If none of the routes in $collection matches $request. This is a
* performance optimization to not continue the match process when a match * performance optimization to not continue the match process when a match
* will no longer be possible. * will no longer be possible.
*/ */
public function filter(RouteCollection $collection, Request $request); public function filter(RouteCollection $collection, Request $request);
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* field_types = { * field_types = {
* "datetime" * "datetime"
* } * }
*) * )
*/ */
class DateTimeCustomFormatter extends DateTimeFormatterBase { class DateTimeCustomFormatter extends DateTimeFormatterBase {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* field_types = { * field_types = {
* "datetime" * "datetime"
* } * }
*) * )
*/ */
class DateTimePlainFormatter extends DateTimeFormatterBase { class DateTimePlainFormatter extends DateTimeFormatterBase {
......
...@@ -277,7 +277,7 @@ protected function clearLogsEntries() { ...@@ -277,7 +277,7 @@ protected function clearLogsEntries() {
* (optional) The log entry type. * (optional) The log entry type.
* @param string $severity * @param string $severity
* (optional) The log entry severity. * (optional) The log entry severity.
*/ */
protected function filterLogsEntries($type = NULL, $severity = NULL) { protected function filterLogsEntries($type = NULL, $severity = NULL) {
$edit = []; $edit = [];
if (isset($type)) { if (isset($type)) {
......
...@@ -282,8 +282,8 @@ public function testNumberIntegerField() { ...@@ -282,8 +282,8 @@ public function testNumberIntegerField() {
} }
/** /**
* Test float field. * Test float field.
*/ */
public function testNumberFloatField() { public function testNumberFloatField() {
// Create a field with settings to validate. // Create a field with settings to validate.
$field_name = mb_strtolower($this->randomMachineName()); $field_name = mb_strtolower($this->randomMachineName());
......
...@@ -22,7 +22,7 @@ class DrupalSqlBaseTest extends MigrateTestCase { ...@@ -22,7 +22,7 @@ class DrupalSqlBaseTest extends MigrateTestCase {
/** /**
* @var \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase * @var \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
*/ */
protected $base; protected $base;
/** /**
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
class EntityNodeType extends EntityConfigBase { class EntityNodeType extends EntityConfigBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function import(Row $row, array $old_destination_id_values = []) { public function import(Row $row, array $old_destination_id_values = []) {
$entity_ids = parent::import($row, $old_destination_id_values); $entity_ids = parent::import($row, $old_destination_id_values);
if ($row->getDestinationProperty('create_body')) { if ($row->getDestinationProperty('create_body')) {
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
namespace Drupal\Tests\options\Functional; namespace Drupal\Tests\options\Functional;
/** /**
* Tests the options allowed values api. * Tests the options allowed values api.
* *
* @group options * @group options
*/ */
class OptionsDynamicValuesApiTest extends OptionsDynamicValuesTestBase { class OptionsDynamicValuesApiTest extends OptionsDynamicValuesTestBase {
/** /**
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
use Drupal\Core\Form\FormStateInterface; 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) { 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 // 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. // check to the process callback, by which time system_form_alter() has run.
......
...@@ -24,8 +24,8 @@ class DateTimeFieldRdfaTest extends FieldRdfaTestBase { ...@@ -24,8 +24,8 @@ class DateTimeFieldRdfaTest extends FieldRdfaTestBase {
protected $testValue = '2014-01-28T06:01:01'; protected $testValue = '2014-01-28T06:01:01';
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected static $modules = ['datetime']; protected static $modules = ['datetime'];
protected function setUp(): void { protected function setUp(): void {
......
...@@ -27,9 +27,9 @@ class Search extends FilterPluginBase { ...@@ -27,9 +27,9 @@ class Search extends FilterPluginBase {
/** /**
* A search query to use for parsing search keywords. * A search query to use for parsing search keywords.
* *
* @var \Drupal\search\ViewsSearchQuery * @var \Drupal\search\ViewsSearchQuery
*/ */
protected $searchQuery = NULL; protected $searchQuery = NULL;
/** /**
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
class NodeStatisticsDatabaseStorage implements StatisticsStorageInterface { class NodeStatisticsDatabaseStorage implements StatisticsStorageInterface {
/** /**
* The database connection used. * The database connection used.
* *
* @var \Drupal\Core\Database\Connection * @var \Drupal\Core\Database\Connection
*/ */
protected $connection; protected $connection;
/** /**
......
...@@ -25,10 +25,10 @@ class SiteMaintenanceModeForm extends ConfigFormBase { ...@@ -25,10 +25,10 @@ class SiteMaintenanceModeForm extends ConfigFormBase {
protected $state; protected $state;
/** /**
* The permission handler. * The permission handler.
* *
* @var \Drupal\user\PermissionHandlerInterface * @var \Drupal\user\PermissionHandlerInterface
*/ */
protected $permissionHandler; protected $permissionHandler;
/** /**
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
class VocabularyVid extends NumericArgument { class VocabularyVid extends NumericArgument {
/** /**
* The vocabulary storage. * The vocabulary storage.
* *
* @var \Drupal\taxonomy\VocabularyStorageInterface * @var \Drupal\taxonomy\VocabularyStorageInterface
*/ */
protected $vocabularyStorage; protected $vocabularyStorage;
/** /**
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
class TrackerNodeTest extends MigrateSqlSourceTestBase { class TrackerNodeTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected static $modules = ['tracker', 'migrate_drupal']; protected static $modules = ['tracker', 'migrate_drupal'];
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public function providerSource() {
$tests = []; $tests = [];
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
class TrackerUserTest extends MigrateSqlSourceTestBase { class TrackerUserTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected static $modules = ['tracker', 'migrate_drupal']; protected static $modules = ['tracker', 'migrate_drupal'];
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public function providerSource() {
$tests = []; $tests = [];
......
...@@ -274,8 +274,8 @@ protected function assertNoGroupedFilterErrors($message = '', $group = 'Other') ...@@ -274,8 +274,8 @@ protected function assertNoGroupedFilterErrors($message = '', $group = 'Other')
} }
/** /**
* Tests the configuration of grouped exposed filters. * Tests the configuration of grouped exposed filters.
*/ */
public function testExposedGroupedFilter() { public function testExposedGroupedFilter() {
// Click the Expose filter button. // Click the Expose filter button.
$this->drupalPostForm('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type', [], 'Expose filter'); $this->drupalPostForm('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type', [], 'Expose filter');
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
class UnsavedPreviewTest extends UITestBase { class UnsavedPreviewTest extends UITestBase {
/** /**
* Views used by this test. * Views used by this test.
* *
* @var array * @var array
*/ */
public static $testViews = ['content']; public static $testViews = ['content'];
/** /**
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<exclude name="Drupal.Commenting.DocComment.ShortSingleLine"/> <exclude name="Drupal.Commenting.DocComment.ShortSingleLine"/>
<exclude name="Drupal.Commenting.DocComment.MissingShort"/> <exclude name="Drupal.Commenting.DocComment.MissingShort"/>
</rule> </rule>
<rule ref="Drupal.Commenting.DocCommentAlignment"/>
<rule ref="Drupal.Commenting.DocCommentStar"/> <rule ref="Drupal.Commenting.DocCommentStar"/>
<rule ref="Drupal.Commenting.FileComment"/> <rule ref="Drupal.Commenting.FileComment"/>
<rule ref="Drupal.Commenting.FunctionComment"> <rule ref="Drupal.Commenting.FunctionComment">
......
...@@ -110,8 +110,8 @@ protected function tearDown() { ...@@ -110,8 +110,8 @@ protected function tearDown() {
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function getMinkDriverArgs() { protected function getMinkDriverArgs() {
if ($this->minkDefaultDriverClass === DrupalSelenium2Driver::class) { if ($this->minkDefaultDriverClass === DrupalSelenium2Driver::class) {
return getenv('MINK_DRIVER_ARGS_WEBDRIVER') ?: parent::getMinkDriverArgs(); return getenv('MINK_DRIVER_ARGS_WEBDRIVER') ?: parent::getMinkDriverArgs();
......
...@@ -350,7 +350,7 @@ public function testAssert() { ...@@ -350,7 +350,7 @@ public function testAssert() {
* Tests the deprecation of AssertLegacyTrait::assertIdenticalObject. * Tests the deprecation of AssertLegacyTrait::assertIdenticalObject.
* *
* @group legacy * @group legacy
*/ */
public function testAssertIdenticalObject() { 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->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']); $this->assertIdenticalObject((object) ['foo' => 'bar'], (object) ['foo' => 'bar']);
...@@ -360,7 +360,7 @@ public function testAssertIdenticalObject() { ...@@ -360,7 +360,7 @@ public function testAssertIdenticalObject() {
* Tests the deprecation of AssertLegacyTrait::assertNotEqual. * Tests the deprecation of AssertLegacyTrait::assertNotEqual.
* *
* @group legacy * @group legacy
*/ */
public function testAssertNotEqual() { 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->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'); $this->assertNotEqual('foo', 'bar');
...@@ -370,7 +370,7 @@ public function testAssertNotEqual() { ...@@ -370,7 +370,7 @@ public function testAssertNotEqual() {
* Tests the deprecation of AssertLegacyTrait::assertIdentical. * Tests the deprecation of AssertLegacyTrait::assertIdentical.
* *
* @group legacy * @group legacy
*/ */
public function testAssertIdentical() { 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->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'); $this->assertIdentical('foo', 'foo');
...@@ -380,7 +380,7 @@ public function testAssertIdentical() { ...@@ -380,7 +380,7 @@ public function testAssertIdentical() {
* Tests the deprecation of AssertLegacyTrait::assertNotIdentical. * Tests the deprecation of AssertLegacyTrait::assertNotIdentical.
* *
* @group legacy * @group legacy
*/ */
public function testAssertNotIdentical() { 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->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'); $this->assertNotIdentical('foo', 'bar');
...@@ -390,7 +390,7 @@ public function testAssertNotIdentical() { ...@@ -390,7 +390,7 @@ public function testAssertNotIdentical() {
* Tests the deprecation of AssertLegacyTrait::verbose(). * Tests the deprecation of AssertLegacyTrait::verbose().
* *
* @group legacy * @group legacy
*/ */
public function testVerbose() { 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->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'); $this->verbose('The show must go on');
...@@ -400,7 +400,7 @@ public function testVerbose() { ...@@ -400,7 +400,7 @@ public function testVerbose() {
* Tests the deprecation of ::installSchema with the tables key_value(_expire). * Tests the deprecation of ::installSchema with the tables key_value(_expire).
* *
* @group legacy * @group legacy
*/ */
public function testKernelTestBaseInstallSchema() { 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->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']); $this->enableModules(['system']);
......
...@@ -341,7 +341,7 @@ protected function getDefaultDriverInstance() { ...@@ -341,7 +341,7 @@ protected function getDefaultDriverInstance() {
* be overridden in a derived class so it is possible to use a different * 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. * 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. * The JSON-encoded argument string. False if it is not set.
*/ */
protected function getMinkDriverArgs() { protected function getMinkDriverArgs() {
......
...@@ -37,8 +37,8 @@ protected function setUp(): void { ...@@ -37,8 +37,8 @@ protected function setUp(): void {
} }
/** /**
* Tests the processOutbound() method with no _csrf_token route requirement. * Tests the processOutbound() method with no _csrf_token route requirement.
*/ */
public function testProcessOutboundNoRequirement() { public function testProcessOutboundNoRequirement() {
$this->csrfToken->expects($this->never()) $this->csrfToken->expects($this->never())
->method('get'); ->method('get');
......
...@@ -16,7 +16,7 @@ class ExtensionInstallStorageTest extends UnitTestCase { ...@@ -16,7 +16,7 @@ class ExtensionInstallStorageTest extends UnitTestCase {
/** /**
* @covers ::createCollection * @covers ::createCollection
*/ */
public function testCreateCollection() { public function testCreateCollection() {
$memory = new MemoryStorage(); $memory = new MemoryStorage();
$include_profile = FALSE; $include_profile = FALSE;
......
...@@ -333,8 +333,8 @@ public function testSetWithoutData() { ...@@ -333,8 +333,8 @@ public function testSetWithoutData() {
} }
/** /**
* @covers ::getProperties * @covers ::getProperties
*/ */
public function testGetProperties() { public function testGetProperties() {
$fields = $this->entityAdapter->getProperties(); $fields = $this->entityAdapter->getProperties();
$this->assertInstanceOf('Drupal\Core\Field\FieldItemListInterface', $fields['id']); $this->assertInstanceOf('Drupal\Core\Field\FieldItemListInterface', $fields['id']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment