Summary: Ref T7409. If `::` is surrounded by whitespace tokens and the whitespace token contains a newline character, allow it.
Test Plan: Added test case.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Maniphest Tasks: T7409
Differential Revision: https://secure.phabricator.com/D12391
foreach ($tokens as $token) {
if ($token->isAnyWhitespace()) {
+ if (strpos($token->getValue(), "\n") !== false) {
+ continue;
+ }
+
$this->raiseLintAtToken(
$token,
self::LINT_SELF_MEMBER_REFERENCE,
}
MyClass :: myMethod();
+
+SomeReallyLongClassName
+ ::someMethod();
~~~~~~~~~~
error:3:7
advice:7:5
}
MyClass::myMethod();
+
+SomeReallyLongClassName
+ ::someMethod();