@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $start, |
18 | 18 | $end, |
19 | 19 | $step, |
20 | - function ($month) { |
|
20 | + function($month) { |
|
21 | 21 | return sprintf('%2d', $month); |
22 | 22 | }); |
23 | 23 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public static function formatFullText() |
39 | 39 | { |
40 | - return function ($m) { |
|
40 | + return function($m) { |
|
41 | 41 | $list = [ |
42 | 42 | 'January', |
43 | 43 | 'February', |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $start ?: date('Y') - 1, |
18 | 18 | $end ?: date('Y') + 1, |
19 | 19 | $step, |
20 | - function ($year) { |
|
20 | + function($year) { |
|
21 | 21 | return sprintf('%04d', $year); |
22 | 22 | }); |
23 | 23 | } |
@@ -37,15 +37,15 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public static function formatJpnGenGou() |
39 | 39 | { |
40 | - $genGou = [ // until => genGou name |
|
40 | + $genGou = [// until => genGou name |
|
41 | 41 | '1868' => false, // end of genGou, specified by false. |
42 | 42 | '1911' => '明治', |
43 | 43 | '1925' => '大正', |
44 | 44 | '1988' => '昭和', |
45 | 45 | '9999' => '平成', // so far... |
46 | 46 | ]; |
47 | - return function ($year) use ($genGou) { |
|
48 | - $year = (int)$year; |
|
47 | + return function($year) use ($genGou) { |
|
48 | + $year = (int) $year; |
|
49 | 49 | $start = 0; |
50 | 50 | /** @var string|bool $gou */ |
51 | 51 | foreach ($genGou as $ends => $gou) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $this->list = $list; |
27 | 27 | $this->setAttribute('type', $type); |
28 | 28 | $this->setAttribute('name', $name); |
29 | - $this->setAttribute('value', (array)$value); |
|
29 | + $this->setAttribute('value', (array) $value); |
|
30 | 30 | if ($type === 'checkbox') { |
31 | 31 | $this->setMultiple(); |
32 | 32 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $input->fillAttributes($this->getAttribute()); |
84 | 84 | $input->setAttribute('value', $key); |
85 | 85 | $selectedValue = $this->get('value'); |
86 | - if (in_array((string)$key, $selectedValue)) { |
|
86 | + if (in_array((string) $key, $selectedValue)) { |
|
87 | 87 | $input->setAttribute('checked', true); |
88 | 88 | } |
89 | 89 | return $input; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | parent::__construct('select'); |
37 | 37 | $this->list = $list; |
38 | 38 | $this->setAttribute('name', $name); |
39 | - $this->setAttribute('value', (array)$value); |
|
39 | + $this->setAttribute('value', (array) $value); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | private function formSelect() |
75 | 75 | { |
76 | - $selectedValue = (array)$this->get('value'); |
|
76 | + $selectedValue = (array) $this->get('value'); |
|
77 | 77 | $this->setAttribute('value', false); |
78 | 78 | $html = $this->formOptions($this->list, $selectedValue, $this->head); |
79 | 79 | if ($html) { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $html .= "\n <option value=\"\">{$head}</option>"; |
97 | 97 | } |
98 | 98 | foreach ($list as $value => $label) { |
99 | - if (in_array((string)$value, $selectedValue)) { |
|
99 | + if (in_array((string) $value, $selectedValue)) { |
|
100 | 100 | $html .= "\n <option value=\"{$value}\" selected>{$label}</option>"; |
101 | 101 | } else { |
102 | 102 | $html .= "\n <option value=\"{$value}\">{$label}</option>"; |
@@ -142,7 +142,7 @@ |
||
142 | 142 | } elseif ($sep === false) { |
143 | 143 | $this->attributes[$key] = $value; |
144 | 144 | } else { |
145 | - $sep = (string)$sep; |
|
145 | + $sep = (string) $sep; |
|
146 | 146 | $this->attributes[$key] .= $sep . $value; |
147 | 147 | } |
148 | 148 | return $this; |