* @file
* Helper module for token tests.
*/
+
use Drupal\node\NodeInterface;
/**
* Implements hook_page_attachments().
*/
function token_module_test_page_attachments() {
- if ($debug = \Drupal::state()->get('token_page_tokens', array())) {
- $debug += array('tokens' => array(), 'data' => array(), 'options' => array());
+ if ($debug = \Drupal::state()->get('token_page_tokens', [])) {
+ $debug += ['tokens' => [], 'data' => [], 'options' => []];
foreach (array_keys($debug['tokens']) as $token) {
$debug['values'][$token] = \Drupal::token()->replace($token, $debug['data'], $debug['options']);
}