Run Rector on your code to see what it can do for you:
<?php -final class DemoFile implements Stringable -{ +final class DemoFile +{ public function __toString() { return 'tes'; - } + } }
Applied Rules:
Is the result wrong?
rector.php