Update Twig.php

wrong test and fixed formatting