Run Rector on your code to see what it can do for you:

 	public function sayHello(string $command): void
 	{
 		$existingTags = shell_exec($command);
-		if (!$existingTags) {
+		if ($existingTags === '' || $existingTags === '0' || $existingTags === false || $existingTags === null) {
 		}
 	}
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 302c5e - released at 2025-04-18 18:21