Skip to content

False positive: Call to inArray() with different object instances will always evaluate to true #142

Open
@simPod

Description

@simPod
class A {
	public function __construct(private string $val) {
	}	
}

function foo(A $a) {
    Assert::inArray($a, [new A('a')]);
}

gives:

Call to static method Webmozart\Assert\Assert::inArray() with arguments A and array(A) will always evaluate to true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions