diff options
Diffstat (limited to 'vendor/symfony/http-foundation/HeaderBag.php')
| -rw-r--r-- | vendor/symfony/http-foundation/HeaderBag.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php index 8f51ef9dba..b37a72e47e 100644 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ b/vendor/symfony/http-foundation/HeaderBag.php @@ -18,13 +18,13 @@ namespace Symfony\Component\HttpFoundation; */ class HeaderBag implements \IteratorAggregate, \Countable { - protected $headers = array(); - protected $cacheControl = array(); + protected $headers = []; + protected $cacheControl = []; /** * @param array $headers An array of HTTP headers */ - public function __construct(array $headers = array()) + public function __construct(array $headers = []) { foreach ($headers as $key => $values) { $this->set($key, $values); @@ -80,9 +80,9 @@ class HeaderBag implements \IteratorAggregate, \Countable * * @param array $headers An array of HTTP headers */ - public function replace(array $headers = array()) + public function replace(array $headers = []) { - $this->headers = array(); + $this->headers = []; $this->add($headers); } @@ -114,10 +114,10 @@ class HeaderBag implements \IteratorAggregate, \Countable if (!array_key_exists($key, $headers)) { if (null === $default) { - return $first ? null : array(); + return $first ? null : []; } - return $first ? $default : array($default); + return $first ? $default : [$default]; } if ($first) { @@ -148,7 +148,7 @@ class HeaderBag implements \IteratorAggregate, \Countable } } else { if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = array($values); + $this->headers[$key] = [$values]; } else { $this->headers[$key][] = $values; } @@ -196,7 +196,7 @@ class HeaderBag implements \IteratorAggregate, \Countable unset($this->headers[$key]); if ('cache-control' === $key) { - $this->cacheControl = array(); + $this->cacheControl = []; } } |
