@@ -280,10 +280,7 @@ protected function initializeCatalogue($locale)
280
280
$ this ->loadFallbackCatalogues ($ locale );
281
281
}
282
282
283
- /**
284
- * @param string $locale
285
- */
286
- private function initializeCacheCatalogue ($ locale )
283
+ private function initializeCacheCatalogue (string $ locale ): void
287
284
{
288
285
if (isset ($ this ->catalogues [$ locale ])) {
289
286
/* Catalogue already initialized. */
@@ -306,7 +303,7 @@ function (ConfigCacheInterface $cache) use ($locale) {
306
303
$ this ->catalogues [$ locale ] = include $ cache ->getPath ();
307
304
}
308
305
309
- private function dumpCatalogue ($ locale , ConfigCacheInterface $ cache )
306
+ private function dumpCatalogue ($ locale , ConfigCacheInterface $ cache ): void
310
307
{
311
308
$ this ->initializeCatalogue ($ locale );
312
309
$ fallbackContent = $ this ->getFallbackContent ($ this ->catalogues [$ locale ]);
@@ -331,7 +328,7 @@ private function dumpCatalogue($locale, ConfigCacheInterface $cache)
331
328
$ cache ->write ($ content , $ this ->catalogues [$ locale ]->getResources ());
332
329
}
333
330
334
- private function getFallbackContent (MessageCatalogue $ catalogue )
331
+ private function getFallbackContent (MessageCatalogue $ catalogue ): string
335
332
{
336
333
$ fallbackContent = '' ;
337
334
$ current = '' ;
@@ -366,7 +363,7 @@ private function getCatalogueCachePath($locale)
366
363
return $ this ->cacheDir .'/catalogue. ' .$ locale .'. ' .strtr (substr (base64_encode (hash ('sha256 ' , serialize ($ this ->fallbackLocales ), true )), 0 , 7 ), '/ ' , '_ ' ).'.php ' ;
367
364
}
368
365
369
- private function doLoadCatalogue ($ locale )
366
+ private function doLoadCatalogue ($ locale ): void
370
367
{
371
368
$ this ->catalogues [$ locale ] = new MessageCatalogue ($ locale );
372
369
@@ -380,7 +377,7 @@ private function doLoadCatalogue($locale)
380
377
}
381
378
}
382
379
383
- private function loadFallbackCatalogues ($ locale )
380
+ private function loadFallbackCatalogues ($ locale ): void
384
381
{
385
382
$ current = $ this ->catalogues [$ locale ];
386
383
@@ -436,7 +433,7 @@ protected function assertValidLocale($locale)
436
433
*
437
434
* @return ConfigCacheFactoryInterface $configCacheFactory
438
435
*/
439
- private function getConfigCacheFactory ()
436
+ private function getConfigCacheFactory (): ConfigCacheFactoryInterface
440
437
{
441
438
if (!$ this ->configCacheFactory ) {
442
439
$ this ->configCacheFactory = new ConfigCacheFactory ($ this ->debug );
0 commit comments