This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 245872
Collapse All | Expand All

(-)a/php.editor/src/org/netbeans/modules/php/editor/model/impl/MethodScopeImpl.java (-1 / +3 lines)
Lines 75-80 Link Here
75
    private boolean scanned;
75
    private boolean scanned;
76
    private MethodDeclaration originalNode;
76
    private MethodDeclaration originalNode;
77
    private ModelVisitor visitor;
77
    private ModelVisitor visitor;
78
    private boolean isMagic;
78
79
79
    //new contructors
80
    //new contructors
80
    MethodScopeImpl(Scope inScope, String returnType, MethodDeclarationInfo nodeInfo, ModelVisitor visitor, boolean isDeprecated) {
81
    MethodScopeImpl(Scope inScope, String returnType, MethodDeclarationInfo nodeInfo, ModelVisitor visitor, boolean isDeprecated) {
Lines 91-96 Link Here
91
        assert inScope instanceof TypeScope : inScope.getClass().toString();
92
        assert inScope instanceof TypeScope : inScope.getClass().toString();
92
        classNormName = inScope.getNormalizedName();
93
        classNormName = inScope.getNormalizedName();
93
        scanned = true;
94
        scanned = true;
95
        isMagic = true;
94
    }
96
    }
95
97
96
    MethodScopeImpl(Scope inScope, BaseFunctionElement element) {
98
    MethodScopeImpl(Scope inScope, BaseFunctionElement element) {
Lines 148-154 Link Here
148
150
149
    @Override
151
    @Override
150
    public boolean isMagic() {
152
    public boolean isMagic() {
151
        return PredefinedSymbols.MAGIC_METHODS.contains(getName().toLowerCase());
153
        return isMagic || PredefinedSymbols.MAGIC_METHODS.contains(getName().toLowerCase());
152
    }
154
    }
153
155
154
    @Override
156
    @Override
(-)a/php.editor/src/org/netbeans/modules/php/editor/verification/MethodRedeclarationHintError.java (+7 lines)
Lines 50-55 Link Here
50
import org.netbeans.modules.csl.api.OffsetRange;
50
import org.netbeans.modules.csl.api.OffsetRange;
51
import org.netbeans.modules.php.editor.model.FileScope;
51
import org.netbeans.modules.php.editor.model.FileScope;
52
import org.netbeans.modules.php.editor.model.FunctionScope;
52
import org.netbeans.modules.php.editor.model.FunctionScope;
53
import org.netbeans.modules.php.editor.model.MethodScope;
53
import org.netbeans.modules.php.editor.model.ModelUtils;
54
import org.netbeans.modules.php.editor.model.ModelUtils;
54
import org.netbeans.modules.php.editor.model.TypeScope;
55
import org.netbeans.modules.php.editor.model.TypeScope;
55
import org.netbeans.modules.php.editor.parser.PHPParseResult;
56
import org.netbeans.modules.php.editor.parser.PHPParseResult;
Lines 128-133 Link Here
128
    private void checkDeclaredFunctions(Collection<? extends FunctionScope> declaredFunctions) {
129
    private void checkDeclaredFunctions(Collection<? extends FunctionScope> declaredFunctions) {
129
        Set<String> declaredMethodNames = new HashSet<>();
130
        Set<String> declaredMethodNames = new HashSet<>();
130
        for (FunctionScope functionScope : declaredFunctions) {
131
        for (FunctionScope functionScope : declaredFunctions) {
132
            if (functionScope instanceof MethodScope) {
133
                MethodScope methodScope = (MethodScope) functionScope;
134
                if (methodScope.isMagic()) {
135
                    continue;
136
                }
137
            }
131
            if (!isInConditionStatament(functionScope)) {
138
            if (!isInConditionStatament(functionScope)) {
132
                String fullyQualifiedFunctionName = functionScope.getFullyQualifiedName().toString();
139
                String fullyQualifiedFunctionName = functionScope.getFullyQualifiedName().toString();
133
                if (declaredMethodNames.contains(fullyQualifiedFunctionName)) {
140
                if (declaredMethodNames.contains(fullyQualifiedFunctionName)) {

Return to bug 245872