Search in sources :

Example 1 with PhpClassMember

use of com.jetbrains.php.lang.psi.elements.PhpClassMember in project phpinspectionsea by kalessil.

the class ProtectedMembersOfFinalClassStrategy method isOverride.

private static boolean isOverride(@NotNull PhpClassMember member, @NotNull PhpClass clazz) {
    boolean result = false;
    final PhpClass parent = OpenapiResolveUtil.resolveSuperClass(clazz);
    if (null != parent) {
        final String memberName = member.getName();
        final PhpClassMember parentMember = member instanceof Field ? parent.findFieldByName(memberName, ((Field) member).isConstant()) : OpenapiResolveUtil.resolveMethod(parent, memberName);
        result = parentMember != null;
    }
    return result;
}
Also used : Field(com.jetbrains.php.lang.psi.elements.Field) PhpClass(com.jetbrains.php.lang.psi.elements.PhpClass) PhpClassMember(com.jetbrains.php.lang.psi.elements.PhpClassMember)

Aggregations

Field (com.jetbrains.php.lang.psi.elements.Field)1 PhpClass (com.jetbrains.php.lang.psi.elements.PhpClass)1 PhpClassMember (com.jetbrains.php.lang.psi.elements.PhpClassMember)1