source/AbstractPhysicalQuantity.php
public static function addUnit(UnitOfMeasureInterface $unit)
    {
        if (static::unitNameOrAliasesAlreadyRegistered($unit)) {
            throw new Exception\DuplicateUnitNameOrAlias([
                ':labels' => implode(', ', array_merge([$unit->getName()], $unit->getAliases()))
            ]);
        }

        static::$unitDefinitions[] = $unit;
    }
public static function addUnit(UnitOfMeasureInterface $unit)
    {
        if (static::unitNameOrAliasesAlreadyRegistered($unit)) {
            throw new Exception\DuplicateUnitNameOrAlias([
                ':labels' => implode(', ', array_merge([$unit->getName()], $unit->getAliases()))
            ]);
        }

        static::$unitDefinitions[] = $unit;
    }
Register a new unit of measure for all instances of this this physical quantity.

@throws Exception\DuplicateUnitNameOrAlias If the unit name or any alias already exists

@param UnitOfMeasureInterface $unit The new unit of measure