Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
[ZF2-549][#2342] CS fixes
Browse files Browse the repository at this point in the history
- Trailing whitespace
  • Loading branch information
weierophinney committed Sep 13, 2012
1 parent f292d0a commit 272c704
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions library/Zend/Log/Formatter/ErrorHandler.php
Expand Up @@ -35,20 +35,20 @@ public function format($event)
if (isset($event['timestamp']) && $event['timestamp'] instanceof DateTime) {
$event['timestamp'] = $event['timestamp']->format($this->getDateTimeFormat());
}

foreach ($this->buildReplacementsFromArray($event) as $name => $value) {
$output = str_replace("%$name%", $value, $output);
}

return $output;
}

/**
* Flatten the multi-dimensional $event array into a single dimensional
* array
*
* @param array $event
* @param string $key
* @param array $event
* @param string $key
* @return array
*/
protected function buildReplacementsFromArray ($event, $key = null)
Expand Down
6 changes: 3 additions & 3 deletions tests/ZendTest/Log/Formatter/ErrorHandlerTest.php
Expand Up @@ -36,7 +36,7 @@ public function testFormat()
'errno' => 1,
'file' => 'test.php',
'line' => 1,
'context' => array('object' => new DateTime(), 'string' => 'test')
'context' => array('object' => new DateTime(), 'string' => 'test')
)
);
$formatter = new ErrorHandler();
Expand Down Expand Up @@ -82,6 +82,6 @@ public function testComplexEvent ()
$output = $formatter->format($event);
$this->assertEquals($stringObject->__toString() .' %extra[context][object2]% test1 %extra[context][array]% test2', $output);
}


}

0 comments on commit 272c704

Please sign in to comment.