Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed superfluous `else` statements

  • Loading branch information...
commit 7621d26dcfbf9d147b91238532d54ee91f3480d3 1 parent 8559e7b
@craue authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 Twig/Extension/FormExtension.php
View
8 Twig/Extension/FormExtension.php
@@ -86,9 +86,13 @@ public function cloneForm($value, array $formOptions = array()) {
if ($value instanceof FormView) {
// doesn't work: return clone $value;
return unserialize(serialize($value));
- } elseif ($value instanceof FormInterface) {
+ }
+
+ if ($value instanceof FormInterface) {
return $value->createView();
- } elseif ($value instanceof FormTypeInterface) {
+ }
+
+ if ($value instanceof FormTypeInterface) {
if ($this->formFactory === null) {
throw new \RuntimeException('No form factory available.');
}
Please sign in to comment.
Something went wrong with that request. Please try again.