'Create a PHPArg object from the given text'

def _parseOneArgument(self, styles, text):

    pos = 0
    name = None
    citdl = None
    default = None
    sig_parts = []
    log.debug('_parseOneArgument:    text:    %r', text)
    while (pos < len(styles)):
        sig_parts.append(text[pos])
        if (name is None):
            if (styles[pos] == self.PHP_VARIABLE):
                name = self._removeDollarSymbolFromVariableName(text[pos])
            elif (styles[pos] in (self.PHP_IDENTIFIER, self.PHP_WORD)):
                citdl = text[pos]
                sig_parts.append('    ')
            elif (text[pos] == '&'):
                sig_parts.append('    ')
        elif (not citdl):
            if (text[pos] == '='):
                sig_parts[(-1)] = '    =    '
                default = ''.join(text[(pos + 1):])
                (valueType, pos) = self._getVariableType(styles, text, (pos + 1))
                if valueType:
                    citdl = valueType[0]
                break
        else:
            pos += 1
            break
        pos += 1
    sig_parts += text[pos:]
    if (name is not None):
        return PHPArg(name, citdl=citdl, signature=''.join(sig_parts), default=default)
