src/Bag.php
public function add($name, $value = null)
    {
        $name = trim($name);

        if (!isset($this->parameters[$name])) {
            $this->parameters[$name] = [];
        } elseif (!is_array($this->parameters[$name])) {
            $this->parameters[$name] = (array) $this->parameters[$name];
        }

        $this->parameters[$name][] = $value;
    }
public function add($name, $value = null)
    {
        $name = trim($name);

        if (!isset($this->parameters[$name])) {
            $this->parameters[$name] = [];
        } elseif (!is_array($this->parameters[$name])) {
            $this->parameters[$name] = (array) $this->parameters[$name];
        }

        $this->parameters[$name][] = $value;
    }
public function add ( $ name , $ value = null ) { $ name = trim ( $ name ) ; if ( ! isset ( $ this -> parameters [ $ name ] ) ) { $ this -> parameters [ $ name ] = [ ] ; } elseif ( ! is_array ( $ this -> parameters [ $ name ] ) ) { $ this -> parameters [ $ name ] = ( array ) $ this -> parameters [ $ name ] ; } $ this -> parameters [ $ name ] [ ] = $ value ; }
Adds a subvalue

@param string $name  Name of the value
@param mixed  $value The value to add
Adds a subvalue