Run Rector on your code to see what it can do for you:
<?php +declare(strict_types=1); + use PHPUnit\Framework\TestCase; final class DemoTest extends TestCase
{ $var = testFunction(true); - $this->assertNotNull($var); + $this->assertInstanceOf(\stdClass::class, $var); } public function testIsNull()
{ $var = testFunction(false); - $this->assertNull($var); + $this->assertNotInstanceOf(\stdClass::class, $var); } }
} return null; }
Applied Rules:
Not a change you expect?
rector.php