for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace EasyTaxi\NewRelic\Formatter;
class ArgumentsFormatter implements FormatterInterface
{
public function format(array $arguments)
$output = new \ArrayObject();
foreach ($arguments as $key => $value) {
if (null === $value || is_scalar($value)) {
$output[$key] = $value;
} else {
$this->expandArgument($value, $output);
}
return $output;
private function expandArgument($argument, $flatten)
foreach ($argument as $key => $value) {
$flatten[$key] = $value;
$flatten[$key] = @json_encode($value);