Give your SQL string a formatted structure on output with SQLFormatter

Code
<?php

$sql 
'select id, name, feathers, color from budgy where dirt_level > 50';
$sql .= ' group by flock order by cage_id';

echo 
SqlFormatter::format($sql);
Result
select 
  id, 
  name, 
  feathers, 
  color 
from 
  budgy 
where 
  dirt_level > 50 
group by 
  flock 
order by 
  cage_id
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6