@@ -33,10 +33,11 @@ public function getFilters(): array
3333 new TwigFilter ('simple_http_beautify ' , array ($ this , 'format ' ), $ safe ),
3434 new TwigFilter ('simple_http_format_http_code ' , array ($ this , 'formatHttpCode ' ), $ safe ),
3535 new TwigFilter ('simple_http_format_http_code_as_badge ' , array ($ this , 'formatHttpCodeAsSfBadge ' ), $ safe ),
36- new TwigFilter ('simple_http_md5 ' , array ( $ this , 'md5 ' ) ),
36+ new TwigFilter ('simple_http_md5 ' , 'md5 ' ),
3737 new TwigFilter ('simple_http_include_asset ' , array ($ this , 'assetInclude ' ), $ safe ),
3838 new TwigFilter ('simple_http_format_ms ' , array ($ this , 'formatMilliseconds ' )),
3939 new TwigFilter ('simple_http_format_num ' , array ($ this , 'numberFormat ' )),
40+ new TwigFilter ('simple_json_decode ' , 'json_decode ' ),
4041 ];
4142 }
4243
@@ -72,15 +73,6 @@ public function formatMilliseconds($ms): string
7273 return $ this ->numberFormat ($ ms * 1000 ) . " ms " ;
7374 }
7475
75- /**
76- * @param $str
77- * @return string
78- */
79- public function md5 ($ str ): string
80- {
81- return md5 ($ str );
82- }
83-
8476 public function assetInclude (string $ file ): string
8577 {
8678 try {
0 commit comments