protected function register(
        string $type,
        $name,
        string $source,
        $dependencies,
        $attributes,
        $replaces
    ): void {
        $dependencies = (array) $dependencies;
        $attributes = (array) $attributes;
        $replaces = (array) $replaces;

        if (\is_array($name)) {
            $replaces = \array_merge($name, $replaces);
            $name = '*';
        }

        $this->assets[$type][$name] = [
            'source' => $source,
            'dependencies' => $dependencies,
            'attributes' => $attributes,
            'replaces' => $replaces,
        ];
    }