From faa3cee494b9a2c80a6be756ede8c2098b2bc1bc Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Tue, 4 Dec 2012 14:04:48 +0700 Subject: [PATCH 1/3] fix typo "broker" should be "manager" --- src/Renderer/ConsoleRenderer.php | 2 +- src/Variables.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Renderer/ConsoleRenderer.php b/src/Renderer/ConsoleRenderer.php index 377ce119..e53b723d 100644 --- a/src/Renderer/ConsoleRenderer.php +++ b/src/Renderer/ConsoleRenderer.php @@ -35,7 +35,7 @@ class ConsoleRenderer implements RendererInterface, TreeRendererInterface * Constructor. * * - * @todo handle passing helper broker, options + * @todo handle passing helper manager, options * @todo handle passing filter chain, options * @todo handle passing variables object, options * @todo handle passing resolver object, options diff --git a/src/Variables.php b/src/Variables.php index c0bc579d..bd141ceb 100644 --- a/src/Variables.php +++ b/src/Variables.php @@ -15,7 +15,7 @@ /** * Abstract class for Zend_View to help enforce private constructs. * - * @todo Allow specifying string names for broker, filter chain, variables + * @todo Allow specifying string names for manager, filter chain, variables * @todo Move escaping into variables object * @todo Move strict variables into variables object * @category Zend From 802bc014a0b735ff68bcd93ba4bd83266f7049a0 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Tue, 25 Dec 2012 01:52:06 +0700 Subject: [PATCH 2/3] remove else in other because already return early --- src/Helper/Navigation/AbstractHelper.php | 4 ++-- src/Helper/Navigation/Breadcrumbs.php | 4 ++-- src/Model/ViewModel.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Helper/Navigation/AbstractHelper.php b/src/Helper/Navigation/AbstractHelper.php index cace5156..25bbcd0a 100644 --- a/src/Helper/Navigation/AbstractHelper.php +++ b/src/Helper/Navigation/AbstractHelper.php @@ -541,9 +541,9 @@ public function findActive($container, $minDepth = null, $maxDepth = -1) if ($found) { return array('page' => $found, 'depth' => $foundDepth); - } else { - return array(); } + + return array(); } /** diff --git a/src/Helper/Navigation/Breadcrumbs.php b/src/Helper/Navigation/Breadcrumbs.php index 84c8bd60..7cb70010 100644 --- a/src/Helper/Navigation/Breadcrumbs.php +++ b/src/Helper/Navigation/Breadcrumbs.php @@ -291,8 +291,8 @@ public function render($container = null) $partial = $this->getPartial(); if ($partial) { return $this->renderPartial($container, $partial); - } else { - return $this->renderStraight($container); } + + return $this->renderStraight($container); } } diff --git a/src/Model/ViewModel.php b/src/Model/ViewModel.php index d4aa28d3..70a36eca 100644 --- a/src/Model/ViewModel.php +++ b/src/Model/ViewModel.php @@ -222,9 +222,9 @@ public function getVariable($name, $default = null) $name = (string) $name; if (array_key_exists($name, $this->variables)) { return $this->variables[$name]; - } else { - return $default; } + + return $default; } /** From e4f3c7691819cc9e08f79bced7f1b2b05a9afd48 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Tue, 25 Dec 2012 02:22:58 +0700 Subject: [PATCH 3/3] remove trailing_spaces --- src/Helper/Navigation/AbstractHelper.php | 2 +- src/Helper/Navigation/Breadcrumbs.php | 2 +- src/Model/ViewModel.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Helper/Navigation/AbstractHelper.php b/src/Helper/Navigation/AbstractHelper.php index 25bbcd0a..10540a14 100644 --- a/src/Helper/Navigation/AbstractHelper.php +++ b/src/Helper/Navigation/AbstractHelper.php @@ -542,7 +542,7 @@ public function findActive($container, $minDepth = null, $maxDepth = -1) if ($found) { return array('page' => $found, 'depth' => $foundDepth); } - + return array(); } diff --git a/src/Helper/Navigation/Breadcrumbs.php b/src/Helper/Navigation/Breadcrumbs.php index 7cb70010..bf0697a0 100644 --- a/src/Helper/Navigation/Breadcrumbs.php +++ b/src/Helper/Navigation/Breadcrumbs.php @@ -292,7 +292,7 @@ public function render($container = null) if ($partial) { return $this->renderPartial($container, $partial); } - + return $this->renderStraight($container); } } diff --git a/src/Model/ViewModel.php b/src/Model/ViewModel.php index 70a36eca..89c9ed46 100644 --- a/src/Model/ViewModel.php +++ b/src/Model/ViewModel.php @@ -223,7 +223,7 @@ public function getVariable($name, $default = null) if (array_key_exists($name, $this->variables)) { return $this->variables[$name]; } - + return $default; }