File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626use FormatPHP \Exception \InvalidMessageShapeException ;
2727use FormatPHP \Exception \LocaleNotFoundException ;
2828use FormatPHP \Exception \UnableToProcessFileException ;
29+ use FormatPHP \Format \Reader \FormatPHPReader ;
2930use FormatPHP \Format \ReaderInterface ;
3031use FormatPHP \Intl \Locale ;
3132use FormatPHP \Intl \LocaleInterface ;
@@ -55,11 +56,11 @@ final class MessageLoader
5556 public function __construct (
5657 string $ messagesDirectory ,
5758 Config $ config ,
58- ReaderInterface $ formatReader ,
59+ ? ReaderInterface $ formatReader = null ,
5960 ?FileSystemHelper $ fileSystemHelper = null
6061 ) {
6162 $ this ->config = $ config ;
62- $ this ->formatReader = $ formatReader ;
63+ $ this ->formatReader = $ formatReader ?? new FormatPHPReader () ;
6364 $ this ->fileSystemHelper = $ fileSystemHelper ?? new FileSystemHelper ();
6465 $ this ->messagesDirectory = $ this ->fileSystemHelper ->getRealPath ($ messagesDirectory );
6566
You can’t perform that action at this time.
0 commit comments