summaryrefslogtreecommitdiff
path: root/vendor/symfony/cache/Traits/PhpArrayTrait.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/cache/Traits/PhpArrayTrait.php')
-rw-r--r--vendor/symfony/cache/Traits/PhpArrayTrait.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/symfony/cache/Traits/PhpArrayTrait.php b/vendor/symfony/cache/Traits/PhpArrayTrait.php
index 587da5a498..0bec18a07a 100644
--- a/vendor/symfony/cache/Traits/PhpArrayTrait.php
+++ b/vendor/symfony/cache/Traits/PhpArrayTrait.php
@@ -57,13 +57,13 @@ trait PhpArrayTrait
}
$dumpedValues = '';
- $dumpedMap = array();
+ $dumpedMap = [];
$dump = <<<'EOF'
<?php
// This file has been auto-generated by the Symfony Cache Component.
-return array(array(
+return [[
EOF;
@@ -106,7 +106,7 @@ EOF;
$dump .= var_export($key, true)." => {$id},\n";
}
- $dump .= "\n), array(\n\n{$dumpedValues}\n));\n";
+ $dump .= "\n], [\n\n{$dumpedValues}\n]];\n";
$tmpFile = uniqid($this->file, true);
@@ -124,7 +124,7 @@ EOF;
*/
public function clear()
{
- $this->keys = $this->values = array();
+ $this->keys = $this->values = [];
$cleared = @unlink($this->file) || !file_exists($this->file);
@@ -137,14 +137,14 @@ EOF;
private function initialize()
{
if (!file_exists($this->file)) {
- $this->keys = $this->values = array();
+ $this->keys = $this->values = [];
return;
}
- $values = (include $this->file) ?: array(array(), array());
+ $values = (include $this->file) ?: [[], []];
if (2 !== \count($values) || !isset($values[0], $values[1])) {
- $this->keys = $this->values = array();
+ $this->keys = $this->values = [];
} else {
list($this->keys, $this->values) = $values;
}