public static function join(...$parts)
    {
        // In case $parts passed as an array in first parameter
        if (count($parts) === 1 && is_array($parts[0])) {
            $parts = $parts[0];
        }

        // Cleanup and join all parts
        $parts = array_filter(array_map('trim', $parts));
        $fullPath = static::normalise(implode(DIRECTORY_SEPARATOR, $parts));

        // Protect against directory traversal vulnerability (OTG-AUTHZ-001)
        if (strpos($fullPath, '..') !== false) {
            throw new InvalidArgumentException('Can not collapse relative folders');
        }

        return $fullPath ?: DIRECTORY_SEPARATOR;
    }