diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php index 8f9cb44..e7d4191 100644 --- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -60,7 +60,7 @@ class DatabaseBackend implements CacheBackendInterface { * @param array $configuration * The maximum cache expiration time. */ - public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin, $configuration = array()) { + public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin, array $configuration = []) { // All cache tables should be prefixed with 'cache_'. $bin = 'cache_' . $bin; diff --git a/core/modules/system/src/Tests/Cache/DatabaseBackendUnitTest.php b/core/modules/system/src/Tests/Cache/DatabaseBackendUnitTest.php index 434d53d..0ea40d2 100644 --- a/core/modules/system/src/Tests/Cache/DatabaseBackendUnitTest.php +++ b/core/modules/system/src/Tests/Cache/DatabaseBackendUnitTest.php @@ -54,19 +54,19 @@ public function testSetGet() { } public function testCacheBinExpiration(){ - $configuration = array('max_expire' => 2800); + $configuration = ['max_expire' => 2800]; $backend = new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), 'render', $configuration); $backend->set('test_cache1', 'foo'); $cached = $backend->get('test_cache1', true); $this->assertIdentical($cached->expire, (string) (REQUEST_TIME + 2800), 'Maximum cache expire time is correct.'); - $configuration = array('max_expire' => 2799); + $configuration = ['max_expire' => 2799]; $backend = new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), 'render', $configuration); $backend->set('test_cache1', 'foo'); $cached = $backend->get('test_cache1', true); $this->assertIdentical($cached->expire, (string) (REQUEST_TIME + 2799), 'Maximum cache expire time is correct.'); - $configuration = array('max_expire' => 2801); + $configuration = ['max_expire' => 2801]; $backend = new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), 'render', $configuration); $backend->set('test_cache1', 'foo'); $cached = $backend->get('test_cache1', true);