@@ -92,7 +92,7 @@ public function convertAsForm(string $options, string $formType): string
9292 * Print "trans" tag for string $str with parameters $parameters
9393 * for catalog $catalog.
9494 */
95- public function getEchoTrans (string $ str , array $ parameters = [], string $ catalog = 'Admingenerator ' , bool $ escape = null ): string
95+ public function getEchoTrans (string $ str , array $ parameters = [], string $ catalog = 'Admingenerator ' , bool | string $ escape = null ): string
9696 {
9797 $ transParameters = '{} ' ;
9898 $ bag_parameters = [];
@@ -127,31 +127,31 @@ public function getEchoTrans(string $str, array $parameters = [], string $catalo
127127 /**
128128 * Print "echo tag with path call" to the path $path with params $params.
129129 */
130- public function getEchoPath (string $ path , array $ params = null , array |string $ filters = null ): string
130+ public function getEchoPath (string $ path , string $ params = null , array |string $ filters = null ): string
131131 {
132132 if (null === $ params ) {
133133 return (null === $ filters )
134- ? strtr ('{{ path("%%path%%") }} ' , array ( '%%path%% ' => $ path) )
134+ ? strtr ('{{ path("%%path%%") }} ' , [ '%%path%% ' => $ path] )
135135 : strtr (
136136 '{{ path("%%path%%")|%%filters%% }} ' ,
137- array (
137+ [
138138 '%%path%% ' => $ path ,
139139 '%%filters%% ' => (is_array ($ filters ) ? implode ('| ' , $ filters ) : $ filters )
140- )
140+ ]
141141 );
142142 }
143143
144144 $ params = preg_replace ('/\{\{\s+?([\w\.]+)\s+?\}\}/i ' , '$1 ' , $ params );
145145
146146 return (null === $ filters )
147- ? strtr ('{{ path("%%path%%", %%params%%) }} ' , array ( '%%path%% ' => $ path , '%%params%% ' => $ params) )
147+ ? strtr ('{{ path("%%path%%", %%params%%) }} ' , [ '%%path%% ' => $ path , '%%params%% ' => $ params] )
148148 : strtr (
149149 '{{ path("%%path%%", %%params%%)|%%filters%% }} ' ,
150- array (
150+ [
151151 '%%path%% ' => $ path ,
152152 '%%params%% ' => $ params ,
153153 '%%filters%% ' => (is_array ($ filters ) ? implode ('| ' , $ filters ) : $ filters )
154- )
154+ ]
155155 );
156156 }
157157
@@ -246,7 +246,7 @@ public function getEchoRender(string $controller, array $params = []): string
246246 * [Book.title] -> Book.title
247247 * [Book.author.name] -> Book.author.name
248248 */
249- private function getParameterBag (array $ subject ): array |false
249+ private function getParameterBag (string $ subject ): array |false
250250 {
251251 // Backwards compability - replace twig tags with parameters
252252 $ pattern_bc = '/\{\{\s(?<param>[a-zA-Z0-9.]+)\s\}\}+/ ' ;
0 commit comments