Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[#2393][ZF2-558] CS fixes

- indentation
- trailing spaces
  • Loading branch information...
commit 07c7e6c689368841974d8a97e08eba50d27b8dfa 1 parent 41c6931
@weierophinney weierophinney authored
View
4 library/Zend/Form/Element/MultiCheckbox.php
@@ -62,13 +62,13 @@ public function getValueOptions()
public function setValueOptions(array $options)
{
$this->valueOptions = $options;
-
+
// Update InArray validator haystack
if (!is_null($this->validator)) {
$validator = $this->validator->getValidator();
$validator->setHaystack($this->getValueOptionsValues());
}
-
+
return $this;
}
View
6 library/Zend/Form/Element/Select.php
@@ -80,13 +80,13 @@ public function getValueOptions()
public function setValueOptions(array $options)
{
$this->valueOptions = $options;
-
+
// Update InArrayValidator validator haystack
if (!is_null($this->validator)) {
$validator = $this->validator instanceof InArrayValidator ? $this->validator : $this->validator->getValidator();
- $validator->setHaystack($this->getValueOptionsValues());
+ $validator->setHaystack($this->getValueOptionsValues());
}
-
+
return $this;
}
View
10 tests/ZendTest/Form/Element/MultiCheckboxTest.php
@@ -114,17 +114,17 @@ public function testInArrayValidationOfOptions($valueTests, $options)
public function testInArrayValidatorHaystakIsUpdated($valueTests, $options)
{
$element = new MultiCheckboxElement('my-checkbox');
- $inputSpec = $element->getInputSpecification();
+ $inputSpec = $element->getInputSpecification();
$inArrayValidator=$inputSpec['validators'][0]->getValidator();
$element->setAttributes(array(
- 'options' => $options,
- ));
+ 'options' => $options,
+ ));
$haystack=$inArrayValidator->getHaystack();
$this->assertCount(count($options), $haystack);
}
-
-
+
+
public function testAttributeType()
{
$element = new MultiCheckboxElement();
View
8 tests/ZendTest/Form/Element/SelectTest.php
@@ -151,7 +151,7 @@ public function testInArrayValidationOfOptions($valueTests, $options)
$this->assertTrue($inArrayValidator->isValid($valueToTest));
}
}
-
+
/**
* Testing that InArray Validator Haystack is Updated if the Options
* are added after the validator is attached
@@ -162,15 +162,15 @@ public function testInArrayValidatorHaystakIsUpdated($valueTests, $options)
{
$element = new SelectElement('my-select');
$inputSpec = $element->getInputSpecification();
-
+
$inArrayValidator = $inputSpec['validators'][0];
$this->assertInstanceOf('Zend\Validator\InArray', $inArrayValidator);
-
+
$element->setValueOptions($options);
$haystack=$inArrayValidator->getHaystack();
$this->assertCount(count($options), $haystack);
}
-
+
public function testOptionsHasArrayOnConstruct()
{
Please sign in to comment.
Something went wrong with that request. Please try again.