@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | public function configureOptions(OptionsResolver $resolver) |
18 | 18 | { |
19 | - $source = function (Options $options, $config) { |
|
19 | + $source = function(Options $options, $config) { |
|
20 | 20 | $k = $options['value_key']; |
21 | 21 | $v = $options['label_key']; |
22 | 22 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | 'placeholder' => null, |
41 | 41 | ]); |
42 | 42 | |
43 | - $config = function (Options $options, $config) { |
|
43 | + $config = function(Options $options, $config) { |
|
44 | 44 | if (!isset($config['hint'])) { |
45 | 45 | $config['hint'] = $options['hint']; |
46 | 46 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | return $config; |
58 | 58 | }; |
59 | - $attr = function (Options $options, $attr) { |
|
59 | + $attr = function(Options $options, $attr) { |
|
60 | 60 | if (isset($options['placeholder'])) { |
61 | 61 | $attr['placeholder'] = $options['placeholder']; |
62 | 62 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | public function configureOptions(OptionsResolver $resolver) |
25 | 25 | { |
26 | - $attr = function (Options $options) { |
|
26 | + $attr = function(Options $options) { |
|
27 | 27 | return $options['select2'] ? ['style' => 'width: 100%;'] : []; |
28 | 28 | }; |
29 | 29 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function configureOptions(OptionsResolver $resolver) |
37 | 37 | { |
38 | - $configNormalizer = function (Options $options, $config) { |
|
38 | + $configNormalizer = function(Options $options, $config) { |
|
39 | 39 | $config['language'] = $options['language']; |
40 | 40 | |
41 | 41 | // Multi dates not supported yet. |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | return $config; |
58 | 58 | }; |
59 | 59 | |
60 | - $language = function (Options $options) { |
|
60 | + $language = function(Options $options) { |
|
61 | 61 | return \Locale::getPrimaryLanguage($options['locale']); |
62 | 62 | }; |
63 | - $formatter = function (Options $options) { |
|
63 | + $formatter = function(Options $options) { |
|
64 | 64 | return new BootstrapFormatConverter($options['locale']); |
65 | 65 | }; |
66 | 66 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | public function configureOptions(OptionsResolver $resolver) |
34 | 34 | { |
35 | - $configNormalizer = function (Options $options, $config) { |
|
35 | + $configNormalizer = function(Options $options, $config) { |
|
36 | 36 | $config['locale'] = $options['locale']; |
37 | 37 | $config['format'] = call_user_func($options['formatter'], $options['format']); |
38 | 38 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | return $config; |
78 | 78 | }; |
79 | 79 | |
80 | - $formatter = function (Options $options) { |
|
80 | + $formatter = function(Options $options) { |
|
81 | 81 | return new MomentJsFormatConverter($options['locale']); |
82 | 82 | }; |
83 | 83 |
@@ -6,17 +6,17 @@ |
||
6 | 6 | { |
7 | 7 | // http://bootstrap-datepicker.readthedocs.org/en/latest/options.html#format |
8 | 8 | protected $symbolsMap = [ |
9 | - 'dd' => 'dd', // 05 |
|
10 | - 'd' => 'd', // 5 |
|
9 | + 'dd' => 'dd', // 05 |
|
10 | + 'd' => 'd', // 5 |
|
11 | 11 | |
12 | - 'MMMMM' => 'M', // Not supported by Bootstrap calendar |
|
13 | - 'MMMM' => 'MM', // January |
|
14 | - 'MMM' => 'M', // Jan |
|
15 | - 'MM' => 'mm', // 07 |
|
16 | - 'M' => 'm', // 7 |
|
12 | + 'MMMMM' => 'M', // Not supported by Bootstrap calendar |
|
13 | + 'MMMM' => 'MM', // January |
|
14 | + 'MMM' => 'M', // Jan |
|
15 | + 'MM' => 'mm', // 07 |
|
16 | + 'M' => 'm', // 7 |
|
17 | 17 | |
18 | 18 | 'yyyy' => 'yyyy', // 2012 |
19 | - 'yy' => 'yy', // 12 |
|
19 | + 'yy' => 'yy', // 12 |
|
20 | 20 | 'y' => 'yyyy', |
21 | 21 | ]; |
22 | 22 | } |
@@ -6,17 +6,17 @@ discard block |
||
6 | 6 | { |
7 | 7 | // http://momentjs.com/docs/#/displaying/format/ |
8 | 8 | protected $symbolsMap = [ |
9 | - 'dd' => 'DD', // 05 |
|
10 | - 'd' => 'D', // 5 |
|
9 | + 'dd' => 'DD', // 05 |
|
10 | + 'd' => 'D', // 5 |
|
11 | 11 | |
12 | - 'MMMMM' => 'M', // Not supported by Moment js |
|
12 | + 'MMMMM' => 'M', // Not supported by Moment js |
|
13 | 13 | 'MMMM' => 'MMMM', // January |
14 | - 'MMM' => 'MMM', // Jan |
|
15 | - 'MM' => 'MM', // 07 |
|
16 | - 'M' => 'M', // 7 |
|
14 | + 'MMM' => 'MMM', // Jan |
|
15 | + 'MM' => 'MM', // 07 |
|
16 | + 'M' => 'M', // 7 |
|
17 | 17 | |
18 | 18 | 'yyyy' => 'YYYY', // 2012 |
19 | - 'yy' => 'YY', // 12 |
|
19 | + 'yy' => 'YY', // 12 |
|
20 | 20 | 'y' => 'YYYY', |
21 | 21 | |
22 | 22 | // am/pm |
@@ -31,17 +31,17 @@ discard block |
||
31 | 31 | 'H' => 'H', |
32 | 32 | |
33 | 33 | // minutes |
34 | - 'mm' => 'mm', // 04 |
|
35 | - 'm' => 'm', // 4 |
|
34 | + 'mm' => 'mm', // 04 |
|
35 | + 'm' => 'm', // 4 |
|
36 | 36 | |
37 | 37 | // seconds |
38 | - 'ss' => 'ss', // 05 |
|
39 | - 's' => 's', // 5 |
|
38 | + 'ss' => 'ss', // 05 |
|
39 | + 's' => 's', // 5 |
|
40 | 40 | |
41 | 41 | // Quarter |
42 | - 'Q' => 'Q', // 1 |
|
42 | + 'Q' => 'Q', // 1 |
|
43 | 43 | |
44 | 44 | // Day of year |
45 | - 'D' => 'DDD', // 189 |
|
45 | + 'D' => 'DDD', // 189 |
|
46 | 46 | ]; |
47 | 47 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | return $node |
36 | 36 | ->validate() |
37 | - ->ifTrue(function ($v) { |
|
37 | + ->ifTrue(function($v) { |
|
38 | 38 | return false === strpos($v, 'y') || false === strpos($v, 'M') || false === strpos($v, 'd'); |
39 | 39 | }) |
40 | 40 | ->thenInvalid('Should contain the letters "y", "M" and "d".') |