original_string: public function extend(string $abstract, closure $extension) : ContainerInterface
      {
          $object = $this->get($abstract);
  
          $this->collection[$abstract] = $extension($object, $this);
  
          return $this;
      }
code: public function extend(string $abstract, closure $extension) : ContainerInterface
      {
          $object = $this->get($abstract);
  
          $this->collection[$abstract] = $extension($object, $this);
  
          return $this;
      }
code_tokens: public function extend ( string $ abstract , closure $ extension ) : ContainerInterface { $ object = $ this -> get ( $ abstract ) ; $ this -> collection [ $ abstract ] = $ extension ( $ object , $ this ) ; return $ this ; }
docstring: Modify an element with a given function that receive the old element as argument.
  
  @param string  $abstract  The alias name that will be used to call the element.
  @param closure $extension The function that receives the old element and return a new or modified one.
  
  @throws NotFoundException  When no element was found with $abstract key.
  @return ContainerInterface
docstring_tokens: Modify an element with a given function that receive the old element as argument .