Skip to content

Unable to deduce a complex logic #3190

@einenlum

Description

@einenlum

Bug report

(Sorry for the title, could not find one describing the issue. If you have one, you're very welcome to edit it)

Found an interesting bug. This is complex to solve, I think, but still, phpstan produces a warning when it should not. I know it's really far-fetched and this code should be refactored anyway, but I found this false positive report in an old legacy code.

$dedicated can only be true when $component is an instance of Server.

Code snippet that reproduces the problem

Expected output

Should raise no error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions