From fb7693cf4b582fc5908ff44ea888afea066ac93a Mon Sep 17 00:00:00 2001 From: Adam Engebretson Date: Wed, 22 Jul 2015 15:59:51 -0500 Subject: [PATCH] Renaming "optional" to "placeholder" Re: #60 Signed-off-by: Adam Engebretson --- src/FormBuilder.php | 6 +++--- tests/FormBuilderTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FormBuilder.php b/src/FormBuilder.php index bbf8d6f..238428a 100755 --- a/src/FormBuilder.php +++ b/src/FormBuilder.php @@ -494,10 +494,10 @@ class FormBuilder { // all together into one single HTML element that can be put on the form. $html = []; - if(isset($options['optional'])) + if(isset($options['placeholder'])) { - $html[] = $this->placeholderOption($options['optional'], $selected); - unset($options['optional']); + $html[] = $this->placeholderOption($options['placeholder'], $selected); + unset($options['placeholder']); } foreach($list as $value => $display) diff --git a/tests/FormBuilderTest.php b/tests/FormBuilderTest.php index 1d826c0..a727bef 100644 --- a/tests/FormBuilderTest.php +++ b/tests/FormBuilderTest.php @@ -320,7 +320,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase { 'size', ['L' => 'Large', 'S' => 'Small'], null, - ['optional' => 'Select One...'] + ['placeholder' => 'Select One...'] ); $this->assertEquals($select, ''); @@ -328,7 +328,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase { 'size', ['L' => 'Large', 'S' => 'Small'], 'L', - ['optional' => 'Select One...'] + ['placeholder' => 'Select One...'] ); $this->assertEquals($select, ''); }