$newClass = $phpcsFile->findNext(T_STRING, $tClass);
if ($tokens[$newClass]['content'] == $tokens[$end - 1]['content']) return;
}
+ $tNew = $phpcsFile->findPrevious(array(T_NEW), $stackPtr - 1);
+
+ // are we trying to create a new object?
+ if ($tNew === false) {
+ // no
+ $parenthesis = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $end);
+ $nonParenthesis = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $end, null, true);
+
+ // are we accessing something that's static?
+ if ($parenthesis !== false && $parenthesis < $nonParenthesis) {
+ // no -> this looks like a function call of a namespaced function
+ return;
+ }
+ }
$error = 'Namespaced classes (%s) must be imported with use.';
$data = array(
}
}
}
-}
\ No newline at end of file
+}
@header('HTTP/1.1 503 Service Unavailable');
try {
- // @codingStandardsIgnoreStart
\wcf\functions\exception\printThrowable($e);
- // @codingStandardsIgnoreEnd
}
catch (\Throwable $e2) {
echo "<pre>An Exception was thrown while handling an Exception:\n\n";