@@ -82,7 +82,8 @@ public function getList(bool $keysOnly = false): array
8282 {
8383 if ($ keysOnly ) {
8484 $ keys = array_keys ($ this ->rules );
85- return array_combine ($ keys , $ keys ) ?: [];
85+ $ values = array_keys ($ this ->rules );
86+ return array_combine ($ keys , $ values ) ?: [];
8687 }
8788
8889 return $ this ->rules ;
@@ -117,7 +118,7 @@ public function text(float $value, string $rule, bool $showSymbol = true): strin
117118 * @param array $params
118119 * @return string
119120 */
120- public function html ($ current , $ orig , $ params ): string
121+ public function html (array $ current , array $ orig , array $ params ): string
121122 {
122123 $ data = $ this ->format ($ current ['value ' ], $ current ['rule ' ]);
123124 $ rData = $ this ->get ($ current ['rule ' ]);
@@ -131,7 +132,7 @@ public function html($current, $orig, $params): string
131132 $ data ['template ' ]
132133 );
133134
134- return '<span ' . $ this -> htmlAttributes ([
135+ return '<span ' . self :: htmlAttributes ([
135136 'class ' => [
136137 'simpleType ' ,
137138 'simpleType-block ' ,
@@ -151,13 +152,13 @@ public function html($current, $orig, $params): string
151152 * @param array $params
152153 * @return string
153154 */
154- public function htmlInput ($ current , $ orig , $ params ): string
155+ public function htmlInput (array $ current , array $ orig , array $ params ): string
155156 {
156157 $ inputValue = $ params ['formatted ' ]
157158 ? $ this ->text ($ current ['value ' ], $ current ['rule ' ])
158159 : $ this ->text ($ current ['value ' ], $ current ['rule ' ], false );
159160
160- return '<input ' . $ this -> htmlAttributes ([
161+ return '<input ' . self :: htmlAttributes ([
161162 'value ' => $ inputValue ,
162163 'name ' => $ params ['name ' ],
163164 'type ' => 'text ' ,
@@ -178,12 +179,10 @@ public function htmlInput($current, $orig, $params): string
178179 * @param array $attributes
179180 * @return string
180181 */
181- public function htmlAttributes ($ attributes ): string
182+ public static function htmlAttributes (array $ attributes ): string
182183 {
183184 $ result = '' ;
184185
185- $ attributes = (array )$ attributes ;
186-
187186 if (count ($ attributes )) {
188187 foreach ($ attributes as $ key => $ param ) {
189188 $ value = implode (' ' , (array )$ param );
0 commit comments