Skip to content
Snippets Groups Projects

Issue #3331946 Fix the issues reported by phpcs.

8 files
+ 56
63
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -2,10 +2,8 @@
@@ -2,10 +2,8 @@
namespace Drupal\config_token\Form;
namespace Drupal\config_token\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
/**
* Displays the Allowed Tokens form.
* Displays the Allowed Tokens form.
@@ -48,17 +46,17 @@ class AllowedConfigTokensForm extends ConfigFormBase {
@@ -48,17 +46,17 @@ class AllowedConfigTokensForm extends ConfigFormBase {
$tokens[''] = '';
$tokens[''] = '';
// @todo add link to token list /admin/help/token
// @todo add link to token list /admin/help/token
$form['values'] = array(
$form['values'] = [
'#type' => 'table',
'#type' => 'table',
'#caption' => '',
'#caption' => '',
'#header' => array(
'#header' => [
$this->t('Format'),
$this->t('Format'),
$this->t('Token (machine name)'),
$this->t('Token (machine name)'),
$this->t('Name'),
$this->t('Name'),
$this->t('Description'),
$this->t('Description'),
$this->t('Action'),
$this->t('Action'),
),
],
);
];
$i = 0;
$i = 0;
foreach ($tokens as $token => $value) {
foreach ($tokens as $token => $value) {
@@ -92,7 +90,7 @@ class AllowedConfigTokensForm extends ConfigFormBase {
@@ -92,7 +90,7 @@ class AllowedConfigTokensForm extends ConfigFormBase {
'#value' => $this->t('Delete'),
'#value' => $this->t('Delete'),
'#name' => 'delete',
'#name' => 'delete',
'#index' => $i,
'#index' => $i,
];
];
}
}
else {
else {
$form['values'][$i]['add'] = [
$form['values'][$i]['add'] = [
@@ -100,7 +98,7 @@ class AllowedConfigTokensForm extends ConfigFormBase {
@@ -100,7 +98,7 @@ class AllowedConfigTokensForm extends ConfigFormBase {
'#value' => $this->t('Add'),
'#value' => $this->t('Add'),
'#name' => 'add',
'#name' => 'add',
'#index' => $i,
'#index' => $i,
];
];
}
}
}
}
Loading