X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Ftoken%2Fsrc%2FToken.php;h=b75af5ab2a4f71e9b29ece0035490275ce4438d5;hp=360ae351c059c0142053d6133585b1ce0147a826;hb=059867c3f96750652c80f39e44c442a58c2549ee;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2 diff --git a/web/modules/contrib/token/src/Token.php b/web/modules/contrib/token/src/Token.php index 360ae351c..b75af5ab2 100644 --- a/web/modules/contrib/token/src/Token.php +++ b/web/modules/contrib/token/src/Token.php @@ -65,9 +65,9 @@ class Token extends TokenBase implements TokenInterface { } $this->tokenInfo = $token_info; - $this->cache->set($cache_id, $this->tokenInfo, CacheBackendInterface::CACHE_PERMANENT, array( + $this->cache->set($cache_id, $this->tokenInfo, CacheBackendInterface::CACHE_PERMANENT, [ static::TOKEN_INFO_CACHE_TAG, - )); + ]); } } @@ -136,7 +136,7 @@ class Token extends TokenBase implements TokenInterface { */ function getInvalidTokens($type, $tokens) { $token_info = $this->getInfo(); - $invalid_tokens = array(); + $invalid_tokens = []; foreach ($tokens as $token => $full_token) { if (isset($token_info['tokens'][$type][$token])) { @@ -162,7 +162,7 @@ class Token extends TokenBase implements TokenInterface { } else { // Recursively check the chained tokens. - $sub_tokens = $this->findWithPrefix(array($token => $full_token), $parts[0]); + $sub_tokens = $this->findWithPrefix([$token => $full_token], $parts[0]); $invalid_tokens = array_merge($invalid_tokens, $this->getInvalidTokens($sub_token_info['type'], $sub_tokens)); } } @@ -184,7 +184,7 @@ class Token extends TokenBase implements TokenInterface { $valid_types = array_merge($valid_types, $this->getGlobalTokenTypes()); } - $invalid_tokens = array(); + $invalid_tokens = []; $value_tokens = is_string($value) ? $this->scan($value) : $value; foreach ($value_tokens as $type => $tokens) {