Skip to content
Snippets Groups Projects

Resolve #2774071: Fix Drupal.Commenting, DrupalPractice.Commenting, Drupal.Files.LineLength.TooLong phpcs.

Open Resolve #2774071: Fix Drupal.Commenting, DrupalPractice.Commenting, Drupal.Files.LineLength.TooLong phpcs.
Files
43
@@ -15,15 +15,27 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class TokenDevelController extends ControllerBase {
/**
* The tree builder for handling token trees.
*
* @var \Drupal\token\TreeBuilderInterface
*/
protected $treeBuilder;
/**
* The entity mapper for handling token entities.
*
* @var \Drupal\token\TokenEntityMapperInterface
*/
protected $entityMapper;
/**
* Constructs a TokenDevelController object.
*
* @param \Drupal\token\TreeBuilderInterface $tree_builder
* The tree builder service to be injected.
* @param \Drupal\token\TokenEntityMapperInterface $entity_mapper
* The entity mapper service to be injected.
*/
public function __construct(TreeBuilderInterface $tree_builder, TokenEntityMapperInterface $entity_mapper) {
$this->treeBuilder = $tree_builder;
$this->entityMapper = $entity_mapper;
@@ -43,10 +55,10 @@ class TokenDevelController extends ControllerBase {
* Prints the loaded structure of the current entity.
*
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* A RouteMatch object.
* A RouteMatch object.
*
* @return array
* Array of page elements to render.
* Array of page elements to render.
*/
public function entityTokens(RouteMatchInterface $route_match) {
$output = [];
@@ -88,11 +100,13 @@ class TokenDevelController extends ControllerBase {
'tokens' => $this->treeBuilder->buildTree($token_type, $options),
],
];
// phpcs:disable
// foreach ($tree as $token => $token_info) {
// if (!isset($token_info['value']) && !empty($token_info['parent']) && !isset($tree[$token_info['parent']]['value'])) {
// continue;
// }
// }
// phpcs:enable
$build['tokens'] = [
'#type' => 'token_tree_table',
Loading