for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Workana\AsyncJobs\Formatter;
use Exception;
/**
* Format an exception
*
* @author Carlos Frutos <[email protected]>
*/
class ExceptionFormatter extends AggregateFormatterAware
{
* {@inheritdoc}
public function format($target)
return strtr('":message" on :file line :line (:type)', [
':message' => $target->getMessage(),
':file' => $target->getFile(),
':line' => $target->getLine(),
':type' => get_class($target),
]);
}
public function canFormat($target)
return ($target instanceof Exception);