Skip to content

Commit

Permalink
zendframework#6137 - minor cleanups, removing useless else block
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius authored and dima committed Nov 27, 2014
1 parent 9b0b01f commit 2be9c89
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/Zend/Log/Formatter/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,11 @@ public function format($event)
$event['timestamp'] = $event['timestamp']->format($this->getDateTimeFormat());
}

if ($this->elementMap === null) {
$dataToInsert = $event;
} else {
$dataToInsert = $event;

if (null !== $this->elementMap) {
$dataToInsert = array();

foreach ($this->elementMap as $elementName => $fieldKey) {
$dataToInsert[$elementName] = $event[$fieldKey];
}
Expand Down

0 comments on commit 2be9c89

Please sign in to comment.