Phpinspectionsea: unchecked nullable parameter usage

Created on 3 Nov 2016  路  5Comments  路  Source: kalessil/phpinspectionsea

Most helpful comment

So, I want to start with the original scope here - only parameters. And we'll make a followup ticket for chained calls.

Step by step we'll get to fully functional NPEs inspection =)

All 5 comments

May I add nullable types in general to this issue, e.g.:

function f(): ?T {}

f()->m(); // requires null check

I just wrote about this and would love to link your brilliant extension as an example that can help to prevent this kind of mistakes. 馃樆

This is going to be the main feature of the next release ;)

I just hope that amount of reported bugs will be low after 2.3.3 released today, so we could take finally more features into the next release...

So, I want to start with the original scope here - only parameters. And we'll make a followup ticket for chained calls.

Step by step we'll get to fully functional NPEs inspection =)

Ready, fresh binary pushed as well. Please also note limitations.

For beta-testing:

  • download PhpInspectionsEA.jar file from our master branch;
  • in IDE follow this path: File -> Settings -> Plugins;
  • under the plugins list click "Install from disk" and point to the downloaded file;
  • apply chnages, restart ide and activate the inspection (File -> Settings->Editor -> Inspections -> Php -> Php Inspections (EA Extended) -> Probable bugs -> Null pointer exceptions prevention (beta)
Was this page helpful?
0 / 5 - 0 ratings