[Cache] fix used variable name

by @xabbuh

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

$ curl https://fabbot.io/patch/symfony/symfony/29847/c90d748d0c602bc69f58511b6d8aa833d1881ae5/cs.diff | patch -p0
diff -ru src/Symfony/Component/Cache/Simple/Psr6Cache.php src/Symfony/Component/Cache/Simple/Psr6Cache.php
--- src/Symfony/Component/Cache/Simple/Psr6Cache.php	2019-01-11 10:39:38.719417089 +0000
+++ src/Symfony/Component/Cache/Simple/Psr6Cache.php	2019-01-11 10:39:39.531399094 +0000
@@ -147,7 +147,7 @@
         } catch (Psr6CacheException $e) {
             throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
         }
-        $values = array();
+        $values = [];
 
         if (!$this->pool instanceof AdapterInterface) {
             foreach ($items as $key => $item) {
@@ -170,7 +170,7 @@
             unset($metadata[CacheItem::METADATA_TAGS]);
 
             if ($metadata) {
-                $values[$key] = array("\x9D".pack('VN', (int) $metadata[CacheItem::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET, $metadata[CacheItem::METADATA_CTIME])."\x5F" => $values[$key]);
+                $values[$key] = ["\x9D".pack('VN', (int) $metadata[CacheItem::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET, $metadata[CacheItem::METADATA_CTIME])."\x5F" => $values[$key]];
             }
         }
 
@@ -186,7 +186,7 @@
         if (!$valuesIsArray && !$values instanceof \Traversable) {
             throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values)));
         }
-        $items = array();
+        $items = [];
 
         try {
             if (null !== $f = $this->createCacheItem) {
@@ -195,7 +195,7 @@
                     $items[$key] = $f($key, $value, true);
                 }
             } elseif ($valuesIsArray) {
-                $items = array();
+                $items = [];
                 foreach ($values as $key => $value) {
                     $items[] = (string) $key;
                 }
diff -ru src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php
--- src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php	2019-01-11 10:39:38.866413831 +0000
+++ src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php	2019-01-11 10:39:39.543398828 +0000
@@ -15,9 +15,9 @@
 
 abstract class Psr6CacheTest extends CacheTestCase
 {
-    protected $skippedTests = array(
+    protected $skippedTests = [
         'testPrune' => 'Psr6Cache just proxies',
-    );
+    ];
 
     public function createSimpleCache($defaultLifetime = 0)
     {

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
File Permissions