Skip to content
Snippets Groups Projects
Commit fff653ce authored by Jeff Geerling's avatar Jeff Geerling
Browse files

Issue #2856356 by geerlingguy: Fix remaining coding standards issues.

parent d2d7f23f
No related branches found
Tags 8.x-1.24
No related merge requests found
......@@ -98,7 +98,7 @@ function honeypot_get_protected_forms() {
* Array of options to be added to form. Currently accepts 'honeypot' and
* 'time_restriction'.
*/
function honeypot_add_form_protection(&$form, FormStateInterface $form_state, array $options = array()) {
function honeypot_add_form_protection(&$form, FormStateInterface $form_state, array $options = []) {
$account = \Drupal::currentUser();
// Allow other modules to alter the protections applied to this form.
......@@ -237,7 +237,7 @@ function _honeypot_log($form_id, $type) {
* @param array $form_values
* Array of form values (optional).
*/
function honeypot_get_time_limit(array $form_values = array()) {
function honeypot_get_time_limit(array $form_values = []) {
$account = \Drupal::currentUser();
$honeypot_time_limit = \Drupal::config('honeypot.settings')->get('time_limit');
......
......@@ -58,6 +58,8 @@ class HoneypotSettingsController extends ConfigFormBase {
* The entity type manager.
* @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
* The entity type bundle info service.
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
* The cache backend interface.
*/
public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, CacheBackendInterface $cache_backend) {
parent::__construct($config_factory);
......@@ -203,7 +205,7 @@ class HoneypotSettingsController extends ConfigFormBase {
foreach ($bundles as $bundle_key => $bundle) {
$stub = $this->entityTypeManager->getStorage('contact_message')->create([
'contact_form' => $bundle_key
'contact_form' => $bundle_key,
]);
$formController->setEntity($stub);
$form_id = $formController->getFormId();
......
......@@ -22,7 +22,7 @@ class HoneypotFormCacheTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('honeypot', 'node', 'comment', 'contact');
public static $modules = ['honeypot', 'node', 'comment', 'contact'];
protected $node;
......
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