@@ -18,7 +18,7 @@ |
||
| 18 | 18 | public function getFunctions() |
| 19 | 19 | { |
| 20 | 20 | return array( |
| 21 | - new Twig_SimpleFunction( |
|
| 21 | + new Twig_SimpleFunction( |
|
| 22 | 22 | 'form_jquery_validation', |
| 23 | 23 | array($this, 'renderJavascript'), |
| 24 | 24 | array('needs_environment' => true, 'pre_escape' => array('html', 'js'), 'is_safe' => array('html', 'js')) |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | ->defaultTrue() |
| 39 | 39 | ->end() |
| 40 | 40 | ->arrayNode('additionals') |
| 41 | - ->beforeNormalization()->ifString()->then(function ($v) { return strtolower($v) === 'true'; })->end() |
|
| 41 | + ->beforeNormalization()->ifString()->then(function($v) { return strtolower($v) === 'true'; })->end() |
|
| 42 | 42 | ->treatTrueLike(array( |
| 43 | 43 | 'accept' => true, |
| 44 | 44 | 'ipv4' => true, |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | 'equalTo', |
| 62 | 62 | FormHelper::generateCssSelector($primaryView), |
| 63 | 63 | $invalidMessage, |
| 64 | - array( new FieldDependency($primaryView) ) |
|
| 64 | + array(new FieldDependency($primaryView)) |
|
| 65 | 65 | ); |
| 66 | 66 | foreach ($keys as $childName) { |
| 67 | 67 | $childCollection = new RuleCollection(); |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | return !( |
| 55 | 55 | $constraintClass === Length::class && |
| 56 | 56 | (FormHelper::isSymfony3Compatible() ? |
| 57 | - $this->isType($form, ChoiceType::class) : |
|
| 58 | - $this->isType($form, 'choice') |
|
| 57 | + $this->isType($form, ChoiceType::class) : $this->isType($form, 'choice') |
|
| 59 | 58 | ) |
| 60 | 59 | ); |
| 61 | 60 | } |
@@ -308,8 +308,8 @@ |
||
| 308 | 308 | |
| 309 | 309 | $type = strtolower($constraint->type); |
| 310 | 310 | $type = $type === 'boolean' ? 'bool' : $constraint->type; |
| 311 | - $isFunction = 'is_' . $type; |
|
| 312 | - $ctypeFunction = 'ctype_' . $type; |
|
| 311 | + $isFunction = 'is_'.$type; |
|
| 312 | + $ctypeFunction = 'ctype_'.$type; |
|
| 313 | 313 | if (function_exists($isFunction) || function_exists($ctypeFunction)) { |
| 314 | 314 | return null; |
| 315 | 315 | } |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | return !( |
| 55 | 55 | $constraintClass === Length::class && |
| 56 | 56 | (FormHelper::isSymfony3Compatible() ? |
| 57 | - $this->isType($form, ChoiceType::class) : |
|
| 58 | - $this->isType($form, 'choice') |
|
| 57 | + $this->isType($form, ChoiceType::class) : $this->isType($form, 'choice') |
|
| 59 | 58 | ) |
| 60 | 59 | ); |
| 61 | 60 | } |