protected static function createProfiledNameFromArray(array $arg, &$profile)
    {
        // If it's an associative array containing a "name" key
        if (array_key_exists('name', $arg)) {
            return self::createProfiledNameFromObject((object)$arg, $profile);
        }

        // If the argument has two items at least
        if (count($arg) > 1) {
            $name    = array_shift($arg);
            $profile = trim(array_shift($arg)) ?: null;

            return self::createProfiledNameFromString($name, $profile);
        }

        throw new InvalidArgumentException(
            InvalidArgumentException::INVALID_TYPE_PROPERTY_ARRAY_STR,
            InvalidArgumentException::INVALID_TYPE_PROPERTY_ARRAY
        );
    }