original_string: public function addToBundle($name, $deps)
      {
          if ($name == '') {
              throw new exception\InvalidArgumentException('The require.js bundle name must not be empty');
          }
  
          if (!is_array($deps) && !($deps instanceof \Traversable)) {
              $deps = [ $deps ];
          }
  
          if (!isset($this->bundles[$name])) {
              $this->bundles[$name] = [];
          }
  
          foreach ($deps as $item) {
              $item = (string)$item;
  
              if ($item != '') {
                  $this->bundles[$name][] = $item;
              }
          }
  
          return $this;
      }
code: public function addToBundle($name, $deps)
      {
          if ($name == '') {
              throw new exception\InvalidArgumentException('The require.js bundle name must not be empty');
          }
  
          if (!is_array($deps) && !($deps instanceof \Traversable)) {
              $deps = [ $deps ];
          }
  
          if (!isset($this->bundles[$name])) {
              $this->bundles[$name] = [];
          }
  
          foreach ($deps as $item) {
              $item = (string)$item;
  
              if ($item != '') {
                  $this->bundles[$name][] = $item;
              }
          }
  
          return $this;
      }
code_tokens: public function addToBundle ( $ name , $ deps ) { if ( $ name == '' ) { throw new exception \ InvalidArgumentException ( 'The require.js bundle name must not be empty' ) ; } if ( ! is_array ( $ deps ) && ! ( $ deps instanceof \ Traversable ) ) { $ deps = [ $ deps ] ; } if ( ! isset ( $ this -> bundles [ $ name ] ) ) { $ this -> bundles [ $ name ] = [ ] ; } foreach ( $ deps as $ item ) { $ item = ( string ) $ item ; if ( $ item != '' ) { $ this -> bundles [ $ name ] [ ] = $ item ; } } return $ this ; }
docstring: Adde dependencies to an existing bundle
  
  @see http://requirejs.org/docs/api.html#config-bundles
  @param string $name
  @param array|string $deps
  @return self
docstring_tokens: Adde dependencies to an existing bundle