AssertIssetToSpecificMethodRector

Turns assertTrue() + isset() comparisons to more precise assertArrayHasKey() method

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

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertIssetToSpecificMethodRector;

return RectorConfig::configure()
    ->withRules([
        AssertIssetToSpecificMethodRector::class,
    ]);
SETS:  Code Quality