I have a class with a static function:
public static function log($logEntryType)
{
...
{
in the same class I have a few CONSTS:
const TEST1 = 'test1';
const TEST2 = 'test2';
From another class I am making the following call;
MyLogClass::log(MyLogClass::TEST1);
For some reason in PHPStorm 8 -- the whole line is marked with a Expected \\App\\Log but got string
.
Isn't what I'm doing legitimate? where is \\App\\Log coming into the game? Is this something real or some kind of IDE cancer?
This answer worked for me:
log
in MyLogClass::log(MyLogClass::TEST1);
. log
in that line).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.