117.468 - Strange Inspection Warnings
Just installed the new EAP and I'm getting warnings about type is not compatible with this declaration that don't make sense:
get_object_vars($this);
Here a warning on $this says "Expected object, got DATA_Prov5FromRM5Data". DATA_Prov5FromRM5Data IS an object. This does not cause PHP a problem. This error did not occur in the previous EAP and before.
Same thing here:
Common::checkForUndefinedPropertiesAndDisplayError($this, __CLASS__);
Here a warning on $this says "Expected object, got DATA_ProjectsTicket". Again, DATA_ProjectsTicket is an object, but we don't know what kind when we define the method.
So, in this case it appears that PHPStorm no longer honors object as as type. Yet, in the first example, PHP itself specifies the type object as the parameter for get_object_vars($object);
Please sign in to leave a comment.
Here's another one:
self::$aDATA[$sType] = new DATA_FaceSheetFamilyData(odbc_fetch_object($rSQL))
odbc_fetch_object returns....wait for it...an object type. How the heck am I supposed to fix this???
Playing around with autocomplete for obj as a type, I get this:
\PHPSTORM_HELPERS\object
Where did that come from and when??
Ok, I can fix the others with that HELPER thing (it would have been nice to know that was coming), but I have no idea how to fix the warning on this:
/** @var $oException Exception */
foreach(self::$aExceptionsOnShutdown as $oException){
$iErrorNum = $oException->getCode();
$sErrorMsg = $oException->getMessage();
$iErrorLineNum = $oException->getLine();
$sErrorFile = $oException->getFile();
$sErrorType = get_class($oException); <<<<<"Expected null|object, got Exception"
From the blog:
Please pay attention:
I don't even know what that means....
They are working on this... http://youtrack.jetbrains.com/issue/WI-11419?projectKey=WI
Thanks Andriy