diff options
Diffstat (limited to 'vendor/symfony/http-foundation/ParameterBag.php')
| -rw-r--r-- | vendor/symfony/http-foundation/ParameterBag.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php index 19d7ee913a..3c6ba46a6a 100644 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ b/vendor/symfony/http-foundation/ParameterBag.php @@ -26,7 +26,7 @@ class ParameterBag implements \IteratorAggregate, \Countable /** * @param array $parameters An array of parameters */ - public function __construct(array $parameters = array()) + public function __construct(array $parameters = []) { $this->parameters = $parameters; } @@ -56,7 +56,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @param array $parameters An array of parameters */ - public function replace(array $parameters = array()) + public function replace(array $parameters = []) { $this->parameters = $parameters; } @@ -66,7 +66,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @param array $parameters An array of parameters */ - public function add(array $parameters = array()) + public function add(array $parameters = []) { $this->parameters = array_replace($this->parameters, $parameters); } @@ -154,7 +154,7 @@ class ParameterBag implements \IteratorAggregate, \Countable public function getDigits($key, $default = '') { // we need to remove - and + because they're allowed in the filter - return str_replace(array('-', '+'), '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); + return str_replace(['-', '+'], '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); } /** @@ -195,13 +195,13 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @return mixed */ - public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = array()) + public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = []) { $value = $this->get($key, $default); // Always turn $options into an array - this allows filter_var option shortcuts. if (!\is_array($options) && $options) { - $options = array('flags' => $options); + $options = ['flags' => $options]; } // Add a convenience check for arrays. |
