AssertPropertyExistsRector

Turns property_exists comparisons to their method name alternatives in PHPUnit TestCase

-$this->assertFalse(property_exists(new Class, "property"));
-$this->assertTrue(property_exists(new Class, "property"));
+$this->assertClassHasAttribute("property", "Class");
+$this->assertClassNotHasAttribute("property", "Class");

Configure your rector.php:

<?php

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

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