Commit 2e18fe93 authored by catch's avatar catch
Browse files

Issue #2715485 by harsha012, mfernea, malavya, himanshu-dixit, vprocessor,...

Issue #2715485 by harsha012, mfernea, malavya, himanshu-dixit, vprocessor, tameeshb, Mile23, RajeevK, Jo Fitzgerald, tiago.urbano, xjm, klausi: Fix 'Drupal.Commenting.InlineComment.NoSpaceBefore' coding standard
parent 4005f93b
......@@ -355,7 +355,7 @@ protected function viewsTokenReplace($text, $tokens) {
foreach ($tokens as $token => $replacement) {
// Twig wants a token replacement array stripped of curly-brackets.
// Some Views tokens come with curly-braces, others do not.
//@todo: https://www.drupal.org/node/2544392
// @todo: https://www.drupal.org/node/2544392
if (strpos($token, '{{') !== FALSE) {
// Twig wants a token replacement array stripped of curly-brackets.
$token = trim(str_replace(['{{', '}}'], '', $token));
......
......@@ -131,7 +131,7 @@ public function testArgumentDefaultFixed() {
/**
* @todo Test php default argument.
*/
//function testArgumentDefaultPhp() {}
// function testArgumentDefaultPhp() {}
/**
* Test node default argument.
......
......@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE) {
$this->installEntitySchema('node');
$this->installEntitySchema('user');
//$this->installConfig('node');
// $this->installConfig('node');
$this->container->get('kernel')->rebuildContainer();
$node_type = NodeType::create(['type' => 'article']);
......
......@@ -311,7 +311,7 @@ public function testBuildThemeFunctions() {
];
$this->assertEquals($expected, $view->buildThemeFunctions('test_hook'));
//Change the name of the display plugin and make sure that is in the array.
// Change the name of the display plugin and make sure that is in the array.
$view->display_handler->display['display_plugin'] = 'default2';
$expected = [
......
......@@ -63,6 +63,15 @@
<exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/>
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
</rule>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/InlineCommentSniff.php">
<!-- Sniff for: NoSpaceBefore -->
<exclude name="Drupal.Commenting.InlineComment.DocBlock"/>
<exclude name="Drupal.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Drupal.Commenting.InlineComment.NotCapital"/>
<exclude name="Drupal.Commenting.InlineComment.SpacingAfter"/>
<exclude name="Drupal.Commenting.InlineComment.SpacingBefore"/>
<exclude name="Drupal.Commenting.InlineComment.WrongStyle"/>
</rule>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/ControlStructures/ElseIfSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/ControlStructures/ControlSignatureSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Files/EndFileNewlineSniff.php"/>
......
......@@ -504,7 +504,7 @@ public function testSchemaFallback() {
$definition2 = \Drupal::service('config.typed')->getDefinition('config_schema_test.wildcard_fallback.something.something');
// This should be the schema of config_schema_test.wildcard_fallback.* as
//well.
// well.
$this->assertSame($definition, $definition2);
}
......
......@@ -64,7 +64,7 @@ public function testEnableTargetLogging() {
db_query('SELECT name FROM {test} WHERE age > :age', [':age' => 25])->fetchCol();
db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Ringo'], ['target' => 'replica']);//->fetchCol();
db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Ringo'], ['target' => 'replica']);// ->fetchCol();
$queries1 = Database::getLog('testing1');
......
......@@ -353,7 +353,7 @@ public function testEntityAutocompleteAccess() {
public function testEntityAutocompleteIdInput() {
/** @var \Drupal\Core\Form\FormBuilderInterface $form_builder */
$form_builder = $this->container->get('form_builder');
//$form = $form_builder->getForm($this);
// $form = $form_builder->getForm($this);
$form_state = (new FormState())
->setMethod('GET')
->setValues([
......
......@@ -115,7 +115,7 @@ public function testEntityTypeUpdateWithoutData() {
t('The %field_name field needs to be installed.', ['%field_name' => 'Revision ID']),
],
];
$this->assertEqual($this->entityDefinitionUpdateManager->getChangeSummary(), $expected); //, 'EntityDefinitionUpdateManager reports the expected change summary.');
$this->assertEqual($this->entityDefinitionUpdateManager->getChangeSummary(), $expected); // , 'EntityDefinitionUpdateManager reports the expected change summary.');
// Run the update and ensure the revision table is created.
$this->entityDefinitionUpdateManager->applyUpdates();
......
......@@ -16,16 +16,16 @@
class AliasTest extends PathUnitTestBase {
public function testCRUD() {
//Prepare database table.
// Prepare database table.
$connection = Database::getConnection();
$this->fixtures->createTables($connection);
//Create Path object.
// Create Path object.
$aliasStorage = new AliasStorage($connection, $this->container->get('module_handler'));
$aliases = $this->fixtures->sampleUrlAliases();
//Create a few aliases
// Create a few aliases
foreach ($aliases as $idx => $alias) {
$aliasStorage->save($alias['source'], $alias['alias'], $alias['langcode']);
......@@ -34,11 +34,11 @@ public function testCRUD() {
$this->assertEqual(count($rows), 1, format_string('Created an entry for %alias.', ['%alias' => $alias['alias']]));
//Cache the pid for further tests.
// Cache the pid for further tests.
$aliases[$idx]['pid'] = $rows[0]->pid;
}
//Load a few aliases
// Load a few aliases
foreach ($aliases as $alias) {
$pid = $alias['pid'];
$loadedAlias = $aliasStorage->load(['pid' => $pid]);
......@@ -49,7 +49,7 @@ public function testCRUD() {
$loadedAlias = $aliasStorage->load(['source' => '/node/1']);
$this->assertEqual($loadedAlias['alias'], '/alias_for_node_1_und', 'The last created alias loaded by default.');
//Update a few aliases
// Update a few aliases
foreach ($aliases as $alias) {
$fields = $aliasStorage->save($alias['source'], $alias['alias'] . '_updated', $alias['langcode'], $alias['pid']);
......@@ -61,7 +61,7 @@ public function testCRUD() {
$this->assertEqual($pid, $alias['pid'], format_string('Updated entry for pid %pid.', ['%pid' => $pid]));
}
//Delete a few aliases
// Delete a few aliases
foreach ($aliases as $alias) {
$pid = $alias['pid'];
$aliasStorage->delete(['pid' => $pid]);
......@@ -74,11 +74,11 @@ public function testCRUD() {
}
public function testLookupPath() {
//Prepare database table.
// Prepare database table.
$connection = Database::getConnection();
$this->fixtures->createTables($connection);
//Create AliasManager and Path object.
// Create AliasManager and Path object.
$aliasManager = $this->container->get('path.alias_manager');
$aliasStorage = new AliasStorage($connection, $this->container->get('module_handler'));
......
......@@ -100,7 +100,7 @@ protected function setUp() {
$container = $this->prophesize(ContainerInterface::class);
$container->get('cache_tags.invalidator')->willReturn($this->cacheTagsInvalidator->reveal());
//$container->get('typed_data_manager')->willReturn($this->typedDataManager->reveal());
// $container->get('typed_data_manager')->willReturn($this->typedDataManager->reveal());
\Drupal::setContainer($container->reveal());
$this->entityTypeBundleInfo = new EntityTypeBundleInfo($this->entityTypeManager->reveal(), $this->languageManager->reveal(), $this->moduleHandler->reveal(), $this->typedDataManager->reveal(), $this->cacheBackend->reveal());
......
......@@ -1151,7 +1151,7 @@ public function providerTestRequiresEntityDataMigration() {
// Case 6: same storage class, ::hasData() === TRUE, no structure changes.
[$updated_entity_type_definition, $original_entity_type_definition, TRUE, FALSE, FALSE],
// Case 7: different storage class, original storage class exists,
//::hasData() === TRUE, no structure changes.
// ::hasData() === TRUE, no structure changes.
[$updated_entity_type_definition, $original_entity_type_definition_other_existing, TRUE, FALSE, FALSE],
];
}
......
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