WordPress at a glance
function is not described

Automattic\WooCommerce\Vendor\League\Container

Container::add() public WC 1.0

Add an item to the container.

{} It's a method of the class: Container{}

No Hooks.

Return

DefinitionInterface.

Usage

$Container = new Container();
$Container->add( $id, $concrete, $shared ) : DefinitionInterface;
$id(string) (required)
-
$concrete(mixed)
-
$shared(true/false)
-

Code of Container::add() WC 5.0.0

<?php
public function add(string $id, $concrete = null, bool $shared = null) : DefinitionInterface
{
    $concrete = $concrete ?? $id;
    $shared = $shared ?? $this->defaultToShared;

    return $this->definitions->add($id, $concrete, $shared);
}