Commit 088802cc authored by jrockowitz's avatar jrockowitz Committed by jrockowitz

Issue #3083709 by jrockowitz: Release 8.x-5.5.rc1

parent fa08d188
......@@ -174,7 +174,6 @@ function _webform_library_info_alter_recursive(array &$library, array $cdn) {
}
}
/**
* Implements hook_css_alter().
*/
......
......@@ -32,7 +32,7 @@ class WebformOptionsLimitEntityReference extends WebformBrowserTestBase {
// anonymous users.
$this->drupalLogin($this->rootUser);
// Check the entity select is not available
// Check the entity select is not available.
$this->drupalGet('/webform/test_handler_options_limit_ent');
$this->assertRaw('options_limits_entity_select is not available');
......@@ -45,9 +45,9 @@ class WebformOptionsLimitEntityReference extends WebformBrowserTestBase {
// Check the entity select options are now populated.
$this->drupalGet('/webform/test_handler_options_limit_ent');
$this->assertNoRaw('options_limits_entity_select is not available');
$this->assertRaw('<option value="' . $node_1->id () . '">');
$this->assertRaw('<option value="' . $node_2->id () . '">');
$this->assertRaw('<option value="' . $node_3->id () . '">');
$this->assertRaw('<option value="' . $node_1->id() . '">');
$this->assertRaw('<option value="' . $node_2->id() . '">');
$this->assertRaw('<option value="' . $node_3->id() . '">');
// Select node 1 three times.
$this->postSubmission($webform, ['options_limits_entity_select' => [$node_1->id()]]);
......
......@@ -99,8 +99,10 @@ class WebformSanitizeSubmissionsCommands extends DrushCommands implements Saniti
* @param string $value
*
* @return bool
* TRUE if santize websubmission is enabled.
*/
protected function isEnabled($value) {
return $value != 'no' ;
return ($value !== 'no');
}
}
......@@ -43,7 +43,7 @@ class WebformSubmissionLimitBlock extends BlockBase implements ContainerFactoryP
/**
* The current source entity.
*
* @var \Drupal\Core\Entity\EntityInterface|bool;
* @var \Drupal\Core\Entity\EntityInterface|bool;
*/
protected $sourceEntity;
......@@ -594,7 +594,7 @@ class WebformSubmissionLimitBlock extends BlockBase implements ContainerFactoryP
],
'token_tree_link' => [
'token' => $token_manager->buildTreeElement(),
]
],
],
];
}
......@@ -612,7 +612,7 @@ class WebformSubmissionLimitBlock extends BlockBase implements ContainerFactoryP
* @return string
* A token name.
*/
protected static function getTokenName($prefix = 'limit', $type, $source_entity = FALSE) {
protected static function getTokenName($prefix = 'limit', $type = 'webform', $source_entity = FALSE) {
$parts = [$prefix, $type];
if ($source_entity) {
$parts[] = 'source_entity';
......
......@@ -2,7 +2,7 @@
namespace Drupal\webform\Plugin\WebformElement;
use Drupal\webform\Plugin\WebformElementEntityOptionsInterface ;
use Drupal\webform\Plugin\WebformElementEntityOptionsInterface;
/**
* Provides a 'webform_entity_checkboxes' element.
......@@ -14,7 +14,7 @@ use Drupal\webform\Plugin\WebformElementEntityOptionsInterface ;
* category = @Translation("Entity reference elements"),
* )
*/
class WebformEntityCheckboxes extends Checkboxes implements WebformElementEntityOptionsInterface {
class WebformEntityCheckboxes extends Checkboxes implements WebformElementEntityOptionsInterface {
use WebformEntityReferenceTrait;
use WebformEntityOptionsTrait;
......
......@@ -2,7 +2,7 @@
namespace Drupal\webform\Plugin\WebformElement;
use Drupal\webform\Plugin\WebformElementEntityOptionsInterface ;
use Drupal\webform\Plugin\WebformElementEntityOptionsInterface;
/**
* Provides a 'webform_entity_radios' element.
......@@ -14,7 +14,7 @@ use Drupal\webform\Plugin\WebformElementEntityOptionsInterface ;
* category = @Translation("Entity reference elements"),
* )
*/
class WebformEntityRadios extends Radios implements WebformElementEntityOptionsInterface {
class WebformEntityRadios extends Radios implements WebformElementEntityOptionsInterface {
use WebformEntityReferenceTrait;
use WebformEntityOptionsTrait;
......
......@@ -2,7 +2,7 @@
namespace Drupal\webform\Plugin\WebformElement;
use Drupal\webform\Plugin\WebformElementEntityOptionsInterface ;
use Drupal\webform\Plugin\WebformElementEntityOptionsInterface;
/**
* Provides a 'webform_entity_select' element.
......
......@@ -497,7 +497,7 @@ abstract class WebformHandlerBase extends PluginBase implements WebformHandlerIn
/**
* {@inheritdoc}
*/
public function alterElement(array &$element, FormStateInterface $form_state, array $context) { }
public function alterElement(array &$element, FormStateInterface $form_state, array $context) {}
/****************************************************************************/
// Webform submission methods.
......
......@@ -166,7 +166,7 @@ class WebformSettingsLimitUniqueTest extends WebformNodeTestBase {
$this->drupalLogin($user);
$this->drupalGet('/webform/test_form_limit_user_unique');
$this->assertResponse(403);
// Check that access is allowed for edit own submission user.
$this->drupalLogin($edit_own_user);
$this->drupalGet('/webform/test_form_limit_user_unique');
......
......@@ -35,7 +35,6 @@ class WebformSettingsRemoteAddrTest extends WebformTestBase {
],
];
// Make sure the IP is not stored.
$webform = Webform::load('test_form_remote_addr');
$sid = $this->postSubmission($webform, ['name' => 'John']);
......
......@@ -169,7 +169,7 @@ class WebformElementHelper {
*
* @param array $element
* An element.
* @param array $property
* @param array $properties
* Element properties.
*
* @return bool
......
......@@ -338,7 +338,7 @@ interface WebformSubmissionInterface extends ContentEntityInterface, EntityOwner
*/
public function setOriginalData(array $data);
/**
/**
* Get a webform submission element's original data.
*
* @param string $key
......
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