Suppress Deprecation Requires Entry For Each Line in 3.0 EAP - Bug Or Not?

Prior to 3.0, this worked fine:

      /** @noinspection PhpDeprecationInspection */
      $iSQLUserID         = _USERID;
      $sSQLEventDate      = Format::SQLDate($sEventDate, false);
      $sSQLSummary        = mysql_escape_string($sSummary);
      $sSQLDescription    = mysql_escape_string($sDescription);
      $sSQLLocation       = mysql_escape_string($sLocation);
      $sSQLRecurringRate  = mysql_escape_string($sRecurringRate);
      $sSQLIntervalRate   = "INTERVAL $iRecurringNum $sRecurringRate";

Now, I have to do this, or I still get warnings:

           $iSQLUserID         = _USERID;
      $sSQLEventDate      = Format::SQLDate($sEventDate, false);
      /** @noinspection PhpDeprecationInspection */
      $sSQLSummary        = mysql_escape_string($sSummary);
      /** @noinspection PhpDeprecationInspection */
      $sSQLDescription    = mysql_escape_string($sDescription);
      /** @noinspection PhpDeprecationInspection */
      $sSQLLocation       = mysql_escape_string($sLocation);
      /** @noinspection PhpDeprecationInspection */
      $sSQLRecurringRate  = mysql_escape_string($sRecurringRate);
      $sSQLIntervalRate   = "INTERVAL $iRecurringNum $sRecurringRate";

Is that a bug?

4 comments
Comment actions Permalink

Also, this breaks Code Style - align consecutive assignments:

suppress_dep_prob1.JPG

0
Comment actions Permalink

actually the previous behavior was a bug - becase "suppress for statement" shold suppress only ONE statement.

0
Comment actions Permalink

Ok, I can agree that is more appropriate behavior, though it makes things more messy, but what about the align consecutive assignments. Is it possible this could ingnore any single line of comments?

0
Comment actions Permalink

Hello Keith,

We have an issue to make it possible to suppress inspections for the whole file - http://youtrack.jetbrains.net/issue/WI-5784.

Also supression could be available for any meaningfull scope like class, method or function.

Please submit an issue - http://youtrack.jetbrains.net/issues/WI#newissue=yes.

Thank you for feedback!

0

Please sign in to leave a comment.