original_string: public function set(string $abstract, $concrete, bool $shared = false) : ContainerInterface
      {
          if (is_object($concrete)) {
              return $this->instance($abstract, $concrete);
          }
  
          if ($concrete instanceof Closure === false) {
              $concrete = function (Container $container) use ($concrete) {
                  return $container->make($concrete);
              };
          }
  
          if ($shared === true) {
                 $this->collection[$abstract] = $concrete($this);
          } else $this->collection[$abstract] = $concrete;
  
          return $this;
      }
code: public function set(string $abstract, $concrete, bool $shared = false) : ContainerInterface
      {
          if (is_object($concrete)) {
              return $this->instance($abstract, $concrete);
          }
  
          if ($concrete instanceof Closure === false) {
              $concrete = function (Container $container) use ($concrete) {
                  return $container->make($concrete);
              };
          }
  
          if ($shared === true) {
                 $this->collection[$abstract] = $concrete($this);
          } else $this->collection[$abstract] = $concrete;
  
          return $this;
      }
code_tokens: public function set ( string $ abstract , $ concrete , bool $ shared = false ) : ContainerInterface { if ( is_object ( $ concrete ) ) { return $ this -> instance ( $ abstract , $ concrete ) ; } if ( $ concrete instanceof Closure === false ) { $ concrete = function ( Container $ container ) use ( $ concrete ) { return $ container -> make ( $ concrete ) ; } ; } if ( $ shared === true ) { $ this -> collection [ $ abstract ] = $ concrete ( $ this ) ; } else $ this -> collection [ $ abstract ] = $ concrete ; return $ this ; }
docstring: Bind a new element to the container.
  
  @param string                $abstract The alias name that will be used to call the element.
  @param string|closure|object $concrete The element class name, or an closure that makes the element, or the object itself.
  @param bool                  $shared   Define if the element will be a singleton instance.
  
  @return ContainerInterface
docstring_tokens: Bind a new element to the container .