@@ -52,19 +52,13 @@ final class FileStorage implements Storage, TransferableStorage
5252 */
5353 private $ catalogues ;
5454
55- /**
56- * @param TranslationWriterInterface $writer
57- * @param TranslationReaderInterface $reader
58- * @param array $dir
59- * @param array $options
60- */
6155 public function __construct (TranslationWriterInterface $ writer , TranslationReaderInterface $ reader , array $ dir , array $ options = [])
6256 {
6357 if (empty ($ dir )) {
6458 throw new \LogicException ('Third parameter of FileStorage cannot be empty ' );
6559 }
6660
67- if (!array_key_exists ('xliff_version ' , $ options )) {
61+ if (!\ array_key_exists ('xliff_version ' , $ options )) {
6862 // Set default value for xliff version.
6963 $ options ['xliff_version ' ] = '2.0 ' ;
7064 }
@@ -141,13 +135,7 @@ public function import(MessageCatalogueInterface $catalogue, array $options = []
141135 }
142136 }
143137
144- /**
145- * Save catalogue back to file.
146- *
147- * @param MessageCatalogueInterface $catalogue
148- * @param string $domain
149- */
150- private function writeCatalogue (MessageCatalogueInterface $ catalogue , $ locale , $ domain )
138+ private function writeCatalogue (MessageCatalogueInterface $ catalogue , string $ locale , string $ domain ): void
151139 {
152140 $ resources = $ catalogue ->getResources ();
153141 $ options = $ this ->options ;
@@ -171,12 +159,7 @@ private function writeCatalogue(MessageCatalogueInterface $catalogue, $locale, $
171159 $ this ->writer ->write ($ catalogue , $ format , $ options );
172160 }
173161
174- /**
175- * @param string $locale
176- *
177- * @return MessageCatalogue
178- */
179- private function getCatalogue ($ locale )
162+ private function getCatalogue (string $ locale ): MessageCatalogue
180163 {
181164 if (empty ($ this ->catalogues [$ locale ])) {
182165 $ this ->loadCatalogue ($ locale , $ this ->dir );
@@ -185,13 +168,7 @@ private function getCatalogue($locale)
185168 return $ this ->catalogues [$ locale ];
186169 }
187170
188- /**
189- * Load catalogue from files.
190- *
191- * @param string $locale
192- * @param array $dirs
193- */
194- private function loadCatalogue ($ locale , array $ dirs )
171+ private function loadCatalogue (string $ locale , array $ dirs ): void
195172 {
196173 $ currentCatalogue = new MessageCatalogue ($ locale );
197174 foreach ($ dirs as $ path ) {
0 commit comments