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);

6 comments
Comment actions Permalink

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???

0
Comment actions Permalink

Playing around with autocomplete for obj as a type, I get this:

\PHPSTORM_HELPERS\object

Where did that come from and when??

0
Comment actions Permalink

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"

0
Comment actions Permalink

From the blog:

Please pay attention:

  • PHP support no longer relies on internal classes for object, string, number, etc. thus fixing incompatibilities with any frameworks having classes with same names. Please report your experience.


I don't even know what that means....

0
Comment actions Permalink

Thanks Andriy

0

Please sign in to leave a comment.