Skip to content

False positive for \ReflectionException #33

Closed
@marcospassos

Description

@marcospassos

First of all, thank you for bringing such a fantastic library!

I found a bug today catching a reflection exception:

try {
     new \ReflectionProperty(Foo::class, 'property');
} catch (\ReflectionException $exception) {
   // invalid report
}

The inspection message is:

 ReflectionException is never thrown in the corresponding try block  

It's wrong since ReflectionProperty throw an exception if the property or class does not exist.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions