Switch to short array syntax in DetailedErrorFormatter, add spaces between array values

This commit is contained in:
Robbie Averill 2018-10-20 14:30:15 +02:00
parent e211e27470
commit 73df3166b7
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ class DetailedErrorFormatter implements FormatterInterface
);
} else {
$context = isset($record['context']) ? $record['context'] : $record;
foreach (array('code','message','file','line') as $key) {
foreach (['code', 'message', 'file', 'line'] as $key) {
if (!isset($context[$key])) {
$context[$key] = isset($record[$key]) ? $record[$key] : null;
}
@ -57,7 +57,7 @@ class DetailedErrorFormatter implements FormatterInterface
public function formatBatch(array $records)
{
return implode("\n", array_map(array($this, 'format'), $records));
return implode("\n", array_map([$this, 'format'], $records));
}
/**