Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Increase readability, fix indentation #5071

Closed
wants to merge 1 commit into from

2 participants

@localheinz

This PR improves readability by removing a ternary statement and fixes an indentation issue along the way.

@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/5071' into develop
Forward port #5071
16879ce
@weierophinney weierophinney was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 4, 2013
  1. @localheinz
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 3 deletions.
  1. +7 −3 library/Zend/View/Helper/FlashMessenger.php
View
10 library/Zend/View/Helper/FlashMessenger.php
@@ -106,8 +106,11 @@ public function render($namespace = PluginFlashMessenger::NAMESPACE_DEFAULT, arr
// Prepare classes for opening tag
if (empty($classes)) {
- $classes = isset($this->classMessages[$namespace]) ?
- $this->classMessages[$namespace] : $this->classMessages[PluginFlashMessenger::NAMESPACE_DEFAULT];
+ if (isset($this->classMessages[$namespace])) {
+ $classes = $this->classMessages[$namespace];
+ } else {
+ $classes = $this->classMessages[PluginFlashMessenger::NAMESPACE_DEFAULT];
+ }
$classes = array($classes);
}
@@ -121,7 +124,8 @@ public function render($namespace = PluginFlashMessenger::NAMESPACE_DEFAULT, arr
array_walk_recursive($messages, function($item) use (&$messagesToPrint, $escapeHtml, $translator, $translatorTextDomain) {
if ($translator !== null) {
$item = $translator->translate(
- $item, $translatorTextDomain
+ $item,
+ $translatorTextDomain
);
}
$messagesToPrint[] = $escapeHtml($item);
Something went wrong with that request. Please try again.