8000 Lower complexity of Form:isValid() · symfony/symfony@d583ec3 · GitHub
[go: up one dir, main page]

Skip to content

Commit d583ec3

Browse files
krzysiekpiaseckifabpot
authored andcommitted
Lower complexity of Form:isValid()
1 parent c5b792c commit d583ec3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Component/Form/Form.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -766,11 +766,7 @@ public function isValid()
766766
return true;
767767
}
768768

769-
if (count($this->getErrors(true)) > 0) {
770-
return false;
771-
}
772-
773-
return true;
769+
return 0 === count($this->getErrors(true));
774770
}
775771

776772
/**

0 commit comments

Comments
 (0)
0