Skip to content

suggest assertArrayHasKey after assertTrue(isset($x)) #260

@staabm

Description

@staabm
-$this->assertTrue(isset($anything["foo"]), "message");
+$this->assertArrayHasKey("foo", $anything, "message");

similar to AssertSameNullExpectedRule and others

could be auto-fixable.


inspired by rector

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions