Package com.jetbrains.php.lang.psi.resolve.types

Examples of com.jetbrains.php.lang.psi.resolve.types.PhpType


            }

            String propertyName = field.getName();

            // private $isNillable = false;
            PhpType type = field.getType();
            if(type.toString().equals("bool")) {
                completionResultSet.addElement(new PhpAnnotationPropertyLookupElement(new AnnotationProperty(propertyName, AnnotationPropertyEnum.BOOLEAN)));
                return;
            }

            // private $isNillable = array();
            if(type.toString().equals("array")) {
                completionResultSet.addElement(new PhpAnnotationPropertyLookupElement(new AnnotationProperty(propertyName, AnnotationPropertyEnum.ARRAY)));
                return;
            }

            PhpDocComment docComment = field.getDocComment();
View Full Code Here


        String scopeVariable = forScopeVariable.getText();

        // find array types; since they are phptypes they ends with []
        Set<String> types = new HashSet<String>();

        PhpType phpType = new PhpType();
        phpType.add(globalVars.get(variableName).getTypes());

        for(String arrayType: PhpIndex.getInstance(psiElement.getProject()).completeType(psiElement.getProject(), phpType, new HashSet<String>()).getTypes()) {
            if(arrayType.endsWith("[]")) {
                types.add(arrayType.substring(0, arrayType.length() -2));
            }
View Full Code Here

        for(TwigTypeContainer phpNamedElement: previousElement) {

            if(phpNamedElement.getPhpNamedElement() != null) {
                for(PhpNamedElement target : getTwigPhpNameTargets(phpNamedElement.getPhpNamedElement(), typeName)) {
                    PhpType phpType = target.getType();
                    for(String typeString: phpType.getTypes()) {
                        PhpNamedElement phpNamedElement1 = PhpElementsUtil.getClassInterface(phpNamedElement.getPhpNamedElement().getProject(), typeString);
                        if(phpNamedElement1 != null) {
                            phpNamedElements.add(new TwigTypeContainer(phpNamedElement1));
                        }
                    }
View Full Code Here

            if(phpClass.getPresentableFQN() != null) {
                return phpClass.getPresentableFQN();
            }
        }

        PhpType phpType = new PhpType();
        phpType.add(types);
        PhpType phpTypeFormatted = PhpIndex.getInstance(project).completeType(project, phpType, new HashSet<String>());

        if(phpTypeFormatted.getTypes().size() > 0) {
            return StringUtils.join(phpTypeFormatted.getTypes(), "|");
        }

        if(types.size() > 0) {
            return types.iterator().next();
        }
View Full Code Here

        return null;
    }

    public static Collection<PhpClass> getClassFromPhpTypeSet(Project project, Set<String> types) {

        PhpType phpType = new PhpType();
        phpType.add(types);

        ArrayList<PhpClass> phpClasses = new ArrayList<PhpClass>();

        for(String typeName: PhpIndex.getInstance(project).completeType(project, phpType, new HashSet<String>()).getTypes()) {
            if(typeName.startsWith("\\")) {
View Full Code Here

        return phpClasses;
    }

    public static Collection<PhpClass> getClassFromPhpTypeSetArrayClean(Project project, Set<String> types) {

        PhpType phpType = new PhpType();
        phpType.add(types);

        ArrayList<PhpClass> phpClasses = new ArrayList<PhpClass>();

        for(String typeName: PhpIndex.getInstance(project).completeType(project, phpType, new HashSet<String>()).getTypes()) {
            if(typeName.startsWith("\\")) {
View Full Code Here

TOP

Related Classes of com.jetbrains.php.lang.psi.resolve.types.PhpType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.