Skip to content

Commit

Permalink
Merge pull request apache#7461 from junichi11/php-gh-7458-incorrect-p…
Browse files Browse the repository at this point in the history
…sr1-warning

Fix incorrect warnings for the PSR1 hint [apacheGH-7458]
  • Loading branch information
junichi11 authored Jun 14, 2024
2 parents 2776057 + 4e7fc18 commit 6527316
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public String getDisplayName() {

public static class MethodDeclarationHint extends PSR1Hint {
private static final String HINT_ID = "PSR1.Hint.Method"; //NOI18N
private static final String MAGIC_METHODS = "__(construct|destruct|call|callStatic|get|set|isset|unset|sleep|wakeup|toString|invoke|set_state|clone)"; //NOI18N
private static final String MAGIC_METHODS = "__(construct|destruct|call|callStatic|get|set|isset|unset|sleep|wakeup|toString|invoke|set_state|clone|debugInfo|serialize|unserialize)"; //NOI18N
private static final Pattern METHOD_PATTERN = Pattern.compile("([a-z]|" + MAGIC_METHODS + ")[a-zA-Z0-9]*"); //NOI18N

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ function __toString() {}
function __invoke() {}
function __set_state() {}
function __clone() {}
function __debugInfo() {}
function __serialize() {}
function __unserialize() {}

}

Expand Down

0 comments on commit 6527316

Please sign in to comment.