Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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