<?php

namespace Symfony\Component\HttpFoundation;

class ParameterBag implements \IteratorAggregate, \Countable
{
    /**
     * Returns a parameter by name.
     *
     * @param string $key     The key
     * @param mixed  $default The default value if the parameter key does not exist
     *
     * @return mixed
     * @psalm-taint-source input
     * @psalm-mutation-free
     */
    public function get(string $key, $default = null) {}

    /**
     * Returns the parameters.
     *
     * @param string|null $key The name of the parameter to return or null to get them all
     *
     * @return array An array of parameters
     *
     * @psalm-taint-source input
     * @psalm-mutation-free
     */
    public function all(string $key = null) {}
}
