File tree Expand file tree Collapse file tree 6 files changed +19
-5
lines changed
Expand file tree Collapse file tree 6 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ public function getFiles()
436436 ];
437437 }
438438
439- public function getTwigFilters ()
439+ public function getFilters (): array
440440 {
441441 return [
442442 new TwigFilter ('dartComment ' , function ($ value ) {
Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ public function getFiles()
378378 ];
379379 }
380380
381- public function getTwigFilters ()
381+ public function getFilters (): array
382382 {
383383 return [
384384 new TwigFilter ('dotnetComment ' , function ($ value ) {
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ public function getParamExample(array $param)
248248 return $ output ;
249249 }
250250
251- public function getTwigFilters ()
251+ public function getFilters (): array
252252 {
253253 return [
254254 new TwigFilter ('godocComment ' , function ($ value ) {
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ protected function jsonToHash(array $data):string
329329 return $ output ;
330330 }
331331
332- public function getTwigFilters ()
332+ public function getFilters (): array
333333 {
334334 return [
335335 new TwigFilter ('rubyComment ' , function ($ value ) {
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ public function getParamExample(array $param)
434434 return $ output ;
435435 }
436436
437- public function getTwigFilters ()
437+ public function getFilters (): array
438438 {
439439 return [
440440 new TwigFilter ('swiftComment ' , function ($ value ) {
Original file line number Diff line number Diff line change @@ -338,6 +338,20 @@ public function getFilters(): array
338338 new TwigFilter ('getReturn ' , function (array $ method , array $ spec ) {
339339 return $ this ->getReturn ($ method , $ spec );
340340 }),
341+ new TwigFilter ('comment2 ' , function ($ value ) {
342+ $ value = explode ("\n" , $ value );
343+ foreach ($ value as $ key => $ line ) {
344+ $ value [$ key ] = " * " . wordwrap ($ value [$ key ], 75 , "\n * " );
345+ }
346+ return implode ("\n" , $ value );
347+ }, ['is_safe ' => ['html ' ]]),
348+ new TwigFilter ('comment3 ' , function ($ value ) {
349+ $ value = explode ("\n" , $ value );
350+ foreach ($ value as $ key => $ line ) {
351+ $ value [$ key ] = " * " . wordwrap ($ value [$ key ], 75 , "\n * " );
352+ }
353+ return implode ("\n" , $ value );
354+ }, ['is_safe ' => ['html ' ]]),
341355 ];
342356 }
343357}
You can’t perform that action at this time.
0 commit comments