Permalink
Browse files

Remove redundant is_scalar() in config validation

See: a2deb25
  • Loading branch information...
1 parent f53d007 commit b7b9ff90d826b69fa1592aaf461c75c38387c99f @jmikola jmikola committed Mar 18, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 DependencyInjection/Configuration.php
@@ -59,8 +59,8 @@ public function getConfigTreeBuilder()
->then(function($v) { return (int) $v; })
->end()
->validate()
- ->ifTrue(function($v) { return !(is_scalar($v) && (!is_int($v) || $v >= -1)); })
- ->thenInvalid('Scalar expected for "safe" commit option')
+ ->ifTrue(function($v) { return is_int($v) && $v < -1; })
+ ->thenInvalid('Integer (-1 or greater) expected for numeric "safe" commit option')
->end()
->end()
->booleanNode('fsync')->defaultFalse()->end()

0 comments on commit b7b9ff9

Please sign in to comment.