original_string: private function initTypes()
      {
          $this->types = [];
  
          foreach ($this->loadTypes() as $type) {
              if (!$type instanceof BlockTypeInterface) {
                  throw new Exception\UnexpectedTypeException(
                      $type,
                      'Oro\Component\Layout\BlockTypeInterface'
                  );
              }
  
              $this->types[$type->getName()] = $type;
          }
      }
code: private function initTypes()
      {
          $this->types = [];
  
          foreach ($this->loadTypes() as $type) {
              if (!$type instanceof BlockTypeInterface) {
                  throw new Exception\UnexpectedTypeException(
                      $type,
                      'Oro\Component\Layout\BlockTypeInterface'
                  );
              }
  
              $this->types[$type->getName()] = $type;
          }
      }
code_tokens: private function initTypes ( ) { $ this -> types = [ ] ; foreach ( $ this -> loadTypes ( ) as $ type ) { if ( ! $ type instanceof BlockTypeInterface ) { throw new Exception \ UnexpectedTypeException ( $ type , 'Oro\Component\Layout\BlockTypeInterface' ) ; } $ this -> types [ $ type -> getName ( ) ] = $ type ; } }
docstring: Initializes block types.
  
  @throws Exception\UnexpectedTypeException if any registered block type is not
  an instance of BlockTypeInterface
docstring_tokens: Initializes block types .