2525
2626final class TagRenderer implements TagRendererInterface
2727{
28- private EntrypointLookupCollectionInterface $ entrypointLookupCollection ;
29-
30- private AssetRegistryInterface $ assetRegistry ;
31-
3228 private ?ApplicationType $ applicationType = null ;
3329
3430 public function __construct (
35- EntrypointLookupCollectionInterface $ entrypointLookupCollection ,
36- AssetRegistryInterface $ assetRegistry
31+ private readonly EntrypointLookupCollectionInterface $ entrypointLookupCollection ,
32+ private readonly AssetRegistryInterface $ assetRegistry
3733 ) {
3834 try {
3935 $ this ->applicationType = array_key_exists (
@@ -42,12 +38,9 @@ public function __construct(
4238 ) && $ GLOBALS ['TYPO3_REQUEST ' ] instanceof ServerRequestInterface ? ApplicationType::fromRequest (
4339 $ GLOBALS ['TYPO3_REQUEST ' ]
4440 ) : null ;
45- } catch (RuntimeException $ e ) {
41+ } catch (RuntimeException ) {
4642 $ this ->applicationType = null ;
4743 }
48-
49- $ this ->entrypointLookupCollection = $ entrypointLookupCollection ;
50- $ this ->assetRegistry = $ assetRegistry ;
5144 }
5245
5346 public function renderWebpackScriptTags (ScriptTag $ scriptTag ): void
@@ -71,7 +64,7 @@ public function renderWebpackScriptTags(ScriptTag $scriptTag): void
7164 // To do this, it's split up into two parts. The first part wraps the first file
7265 // and the second part wraps the last file.
7366 $ splitChar = ! empty ($ parameters ['splitChar ' ]) ? $ parameters ['splitChar ' ] : '| ' ;
74- $ wrapArr = explode ($ splitChar , $ parameters ['allWrap ' ], 2 );
67+ $ wrapArr = explode ($ splitChar , ( string ) $ parameters ['allWrap ' ], 2 );
7568 $ wrapFirst = $ wrapArr [0 ] . $ splitChar ;
7669 $ wrapLast = $ splitChar . $ wrapArr [1 ];
7770 unset($ parameters ['allWrap ' ]);
@@ -93,7 +86,7 @@ public function renderWebpackScriptTags(ScriptTag $scriptTag): void
9386 }
9487
9588 $ attributes = array_replace ([
96- 'file ' => $ this ->removeLeadingSlash ($ file , $ parameters ) ? ltrim ($ file , '/ ' ) : $ file ,
89+ 'file ' => $ this ->removeLeadingSlash ($ file , $ parameters ) ? ltrim (( string ) $ file , '/ ' ) : $ file ,
9790 'type ' => $ this ->removeType ($ parameters ) ? '' : 'text/javascript ' ,
9891 'compress ' => false ,
9992 'forceOnTop ' => false ,
@@ -112,7 +105,7 @@ public function renderWebpackScriptTags(ScriptTag $scriptTag): void
112105
113106 if ($ scriptTag ->isLibrary ()) {
114107 $ pageRendererMethodName .= 'Library ' ;
115- $ filename = basename ($ file );
108+ $ filename = basename (( string ) $ file );
116109 $ pageRenderer ->{$ pageRendererMethodName }($ filename , ...$ attributes );
117110 } else {
118111 $ pageRendererMethodName .= 'File ' ;
@@ -146,7 +139,7 @@ public function renderWebpackLinkTags(LinkTag $linkTag): void
146139 // To do this, it's split up into two parts. The first part wraps the first file
147140 // and the second part wraps the last file.
148141 $ splitChar = ! empty ($ parameters ['splitChar ' ]) ? $ parameters ['splitChar ' ] : '| ' ;
149- $ wrapArr = explode ($ splitChar , $ parameters ['allWrap ' ], 2 );
142+ $ wrapArr = explode ($ splitChar , ( string ) $ parameters ['allWrap ' ], 2 );
150143 $ wrapFirst = $ wrapArr [0 ] . $ splitChar ;
151144 $ wrapLast = $ splitChar . $ wrapArr [1 ];
152145 unset($ parameters ['allWrap ' ]);
@@ -165,7 +158,7 @@ public function renderWebpackLinkTags(LinkTag $linkTag): void
165158 }
166159
167160 $ attributes = array_replace ([
168- 'file ' => $ this ->removeLeadingSlash ($ file , $ parameters ) ? ltrim ($ file , '/ ' ) : $ file ,
161+ 'file ' => $ this ->removeLeadingSlash ($ file , $ parameters ) ? ltrim (( string ) $ file , '/ ' ) : $ file ,
169162 'rel ' => 'stylesheet ' ,
170163 'media ' => $ linkTag ->getMedia (),
171164 'title ' => '' ,
0 commit comments