original_string: public function addExtension(ExtensionInterface $extension, $priority = 0)
      {
          $this->extensions[$priority][] = $extension;
          $this->sorted                  = null;
          $this->typeExtensions          = [];
      }
code: public function addExtension(ExtensionInterface $extension, $priority = 0)
      {
          $this->extensions[$priority][] = $extension;
          $this->sorted                  = null;
          $this->typeExtensions          = [];
      }
code_tokens: public function addExtension ( ExtensionInterface $ extension , $ priority = 0 ) { $ this -> extensions [ $ priority ] [ ] = $ extension ; $ this -> sorted = null ; $ this -> typeExtensions = [ ] ; }
docstring: Registers an layout extension.
  
  @param ExtensionInterface $extension
  @param int                $priority
docstring_tokens: Registers an layout extension .