Skip to content
Snippets Groups Projects
Commit 10b1162d authored by Chandansha Fakir's avatar Chandansha Fakir Committed by Andrei Ivnitskii
Browse files

Issue #2927121: Coding standard fix - remove blank line

parent 334ca4b6
No related branches found
No related tags found
1 merge request!89Needs reroll to MR Fixed it.
Pipeline #316911 passed with warnings
......@@ -55,7 +55,6 @@ class Flagging extends ContentEntityBase implements FlaggingInterface {
// @todo should there be a data_table annotation?
// @todo should the bundle entity_key annotation be "flag" not "type"?
/**
* {@inheritdoc}
*/
......
......@@ -157,7 +157,6 @@ class FlagService implements FlagServiceInterface {
// reference for the case when the variable is NULL rather than an object;
// also, it must be optional to allow a variable that is NULL to pass the
// type-hint check.
if (!isset($account)) {
// If there isn't an account, set it to the current user.
$account = $this->currentUser;
......
......@@ -348,13 +348,11 @@ abstract class FlagFormBase extends EntityForm {
// We clear caches more vigorously if the flag was new.
// _flag_clear_cache($flag->entity_type, !empty($flag->is_new));
// Save permissions.
// This needs to be done after the flag cache has been cleared, so that
// the new permissions are picked up by hook_permission().
// This may need to move to the flag class when we implement extra
// permissions for different flag types: http://drupal.org/node/879988
// If the flag ID has changed, clean up all the obsolete permissions.
if ($flag->id() != $form['#flag_name']) {
$old_name = $form['#flag_name'];
......@@ -376,7 +374,6 @@ abstract class FlagFormBase extends EntityForm {
*/
// @todo: when we add database caching for flags we'll have to clear the
// cache again here.
$form_state->setRedirect('entity.flag.collection');
}
......
......@@ -88,12 +88,10 @@ class LinkOutputLocationTest extends FlagTestBase {
$this->drupalGet('node/' . $this->node->id());
$this->assertNoPseudofield($this->flag, $this->node);
// TODO: check no entity link.
// Check the teaser view mode for the node shows no flag link.
$this->drupalGet('node');
$this->assertNoPseudofield($this->flag, $this->node);
// TODO: check no entity link.
// Turn on 'show as field'.
// By default, this will be visible on the field display configuration.
$flag_config = $this->flag->getFlagTypePlugin()->getConfiguration();
......@@ -106,12 +104,10 @@ class LinkOutputLocationTest extends FlagTestBase {
$this->drupalGet('node/' . $this->node->id());
$this->assertPseudofield($this->flag, $this->node);
// TODO: check no entity link.
// Check the teaser view mode shows the flag link as a field.
$this->drupalGet('node');
$this->assertPseudofield($this->flag, $this->node);
// TODO: check no entity link.
// Hide the flag field on teaser view mode.
$edit = [
'fields[flag_' . $this->flag->id() . '][region]' => 'hidden',
......@@ -125,12 +121,10 @@ class LinkOutputLocationTest extends FlagTestBase {
$this->drupalGet('node/' . $this->node->id());
$this->assertPseudofield($this->flag, $this->node);
// TODO: check no entity link.
// Check the teaser view mode does not show the flag link as a field.
$this->drupalGet('node');
$this->assertNoPseudofield($this->flag, $this->node);
// TODO: check no entity link.
// TODO:
// Turn on the entity link, and turn off the field.
// Check the full and teaser view modes.
......@@ -159,7 +153,6 @@ class LinkOutputLocationTest extends FlagTestBase {
$this->assertNoPseudofield($this->flag, $this->node);
$this->assertNoContextualLinkPlaceHolder($contextual_links_id);
// TODO: check no entity field link.
$this->drupalGet('node/' . $this->node->id() . '/edit');
$this->assertSession()->fieldNotExists('flag[' . $this->flag->id() . ']');
$this->assertNoContextualLinkPlaceholder($contextual_links_id);
......
......@@ -120,7 +120,6 @@ class FlagActionTest extends FlagKernelTestBase {
// @todo Flagging cache cannot be cleared, so this check cannot happen.
// @see https://www.drupal.org/node/2801423
// $this->assertFalse($entity_flag->isFlagged($test_entity, $this->account));
// Access should be false for this user.
$this->assertFalse($plugin->access($test_entity, $this->account));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment