@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | protected function twig() |
| 25 | 25 | { |
| 26 | 26 | $appVariableReflection = new \ReflectionClass('\Symfony\Bridge\Twig\AppVariable'); |
| 27 | - $vendorTwigBridgeDirectory = dirname((string)$appVariableReflection->getFileName()); |
|
| 27 | + $vendorTwigBridgeDirectory = dirname((string) $appVariableReflection->getFileName()); |
|
| 28 | 28 | |
| 29 | 29 | $loader = new \Twig\Loader\FilesystemLoader([ |
| 30 | - $vendorTwigBridgeDirectory . '/Resources/views/Form', |
|
| 30 | + $vendorTwigBridgeDirectory.'/Resources/views/Form', |
|
| 31 | 31 | ]); |
| 32 | 32 | |
| 33 | 33 | $twig = new \Twig\Environment($loader); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $formEngine = new \Symfony\Bridge\Twig\Form\TwigRendererEngine(['bootstrap_4_layout.html.twig'], $twig); |
| 40 | 40 | $twig->addRuntimeLoader(new \Twig\RuntimeLoader\FactoryRuntimeLoader([ |
| 41 | - \Symfony\Component\Form\FormRenderer::class => function () use ($formEngine) { |
|
| 41 | + \Symfony\Component\Form\FormRenderer::class => function() use ($formEngine) { |
|
| 42 | 42 | return new \Symfony\Component\Form\FormRenderer($formEngine); |
| 43 | 43 | }, |
| 44 | 44 | ])); |
@@ -114,6 +114,6 @@ |
||
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - return (string)$_template; |
|
| 117 | + return (string) $_template; |
|
| 118 | 118 | } |
| 119 | 119 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | private function getDefaultOptions(array $options = []): array |
| 86 | 86 | { |
| 87 | - return (array)array_merge([ |
|
| 87 | + return (array) array_merge([ |
|
| 88 | 88 | 'required' => false, |
| 89 | 89 | ], $options); |
| 90 | 90 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | $_options = []; |
| 99 | 99 | |
| 100 | - $options = array_change_key_case(array_filter($options, function ($var) { |
|
| 100 | + $options = array_change_key_case(array_filter($options, function($var) { |
|
| 101 | 101 | return !is_null($var); |
| 102 | 102 | })); |
| 103 | 103 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | if ($attribute == 'required' || $_value == 'required') { |
| 125 | 125 | $_options['required'] = true; |
| 126 | 126 | } elseif (in_array($attribute, ['length', 'mincheck', 'maxcheck', 'check', 'equalto'])) { |
| 127 | - $_options['attr']['data-parsley-' . $attribute] = $_value; |
|
| 127 | + $_options['attr']['data-parsley-'.$attribute] = $_value; |
|
| 128 | 128 | } elseif ($attribute == 'range') { |
| 129 | 129 | $_options['type'] = $attribute; |
| 130 | 130 | list($min, $max) = explode(',', $_value); |