From b26a9e1072c17d0ba24860890eb857e92072aff7 Mon Sep 17 00:00:00 2001 From: wesleyh Date: Sat, 20 Apr 2013 23:30:04 +0300 Subject: [PATCH] Coding Standards Changed to using null instead of '' and remove the ': ' at the end of the label value. (Though I myself quite like this..) --- FormBuilder.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FormBuilder.php b/FormBuilder.php index 3dfa472..59221fe 100644 --- a/FormBuilder.php +++ b/FormBuilder.php @@ -176,14 +176,15 @@ class FormBuilder { * @param array $options * @return string */ - public function label($name, $value='', $options = array()) + public function label($name, $value=null, $options = array()) { $this->labels[] = $name; $options = $this->html->attributes($options); - if (!$value) { - $value = ucfirst(str_replace('_', ' ', $name)) . ': '; + if (is_null($value)) + { + $value = ucfirst(str_replace('_', ' ', $name)); } return '';