original_string: protected function initializeBundles()
      {
          // init bundles
          $this->bundles = [];
          foreach ($this->registerBundles() as $bundle) {
              $name = $bundle->getName();
              if (isset($this->bundles[$name])) {
                  throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name));
              }
              $this->bundles[$name] = $bundle;
          }
      }
code: protected function initializeBundles()
      {
          // init bundles
          $this->bundles = [];
          foreach ($this->registerBundles() as $bundle) {
              $name = $bundle->getName();
              if (isset($this->bundles[$name])) {
                  throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name));
              }
              $this->bundles[$name] = $bundle;
          }
      }
code_tokens: protected function initializeBundles ( ) { // init bundles $ this -> bundles = [ ] ; foreach ( $ this -> registerBundles ( ) as $ bundle ) { $ name = $ bundle -> getName ( ) ; if ( isset ( $ this -> bundles [ $ name ] ) ) { throw new \ LogicException ( sprintf ( 'Trying to register two bundles with the same name "%s"' , $ name ) ) ; } $ this -> bundles [ $ name ] = $ bundle ; } }
docstring: Initializes bundles.
  
  @throws \LogicException if two bundles share a common name
docstring_tokens: Initializes bundles .