DumpInspector.php 322 B

12345678910111213141516
  1. <?php
  2. /* vim: set shiftwidth=2 expandtab softtabstop=2: */
  3. namespace Boris;
  4. /**
  5. * Passes values through var_dump() to inspect them.
  6. */
  7. class DumpInspector implements Inspector {
  8. public function inspect($variable) {
  9. ob_start();
  10. var_dump($variable);
  11. return sprintf(" → %s", trim(ob_get_clean()));
  12. }
  13. }