protected static function createProperties(array $properties, &$lang)
    {
        // Extract the language (if present)
        $properties = self::createLanguage($properties, $lang);

        $mfProperties = [];
        foreach ($properties as $propertyName => $propertyValues) {
            // Process property values
            if (is_array($propertyValues)) {
                $mfProperties[] = (object)[
                    'profile' => self::MF2_PROFILE_URI,
                    'name'    => $propertyName,
                    'values'  => self::createProperty($propertyValues)
                ];
            }
        }

        return $mfProperties;
    }