1 | <?php |
||
28 | final class FileStorage implements Storage, TransferableStorage |
||
29 | { |
||
30 | /** |
||
31 | * @var TranslationWriterInterface |
||
32 | */ |
||
33 | private $writer; |
||
34 | |||
35 | /** |
||
36 | * @var TranslationReaderInterface |
||
37 | */ |
||
38 | private $reader; |
||
39 | |||
40 | /** |
||
41 | * @var array directory path |
||
42 | */ |
||
43 | private $dir; |
||
44 | |||
45 | /** |
||
46 | * @var array with option to the dumper |
||
47 | */ |
||
48 | private $options; |
||
49 | |||
50 | /** |
||
51 | * @var MessageCatalogue[] Fetched catalogues |
||
52 | */ |
||
53 | private $catalogues; |
||
54 | |||
55 | /** |
||
56 | * @param TranslationWriterInterface $writer |
||
57 | * @param TranslationReaderInterface $reader |
||
58 | * @param array $dir |
||
59 | * @param array $options |
||
60 | */ |
||
61 | 9 | public function __construct(TranslationWriterInterface $writer, TranslationReaderInterface $reader, array $dir, array $options = []) |
|
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | 1 | public function get($locale, $domain, $key) |
|
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | 2 | public function create(MessageInterface $m) |
|
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | 1 | public function update(MessageInterface $m) |
|
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | 1 | public function delete($locale, $domain, $key) |
|
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | 1 | public function export(MessageCatalogueInterface $catalogue) |
|
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | 1 | public function import(MessageCatalogueInterface $catalogue) |
|
143 | |||
144 | /** |
||
145 | * Save catalogue back to file. |
||
146 | * |
||
147 | * @param MessageCatalogueInterface $catalogue |
||
148 | * @param string $domain |
||
149 | */ |
||
150 | 5 | private function writeCatalogue(MessageCatalogueInterface $catalogue, $locale, $domain) |
|
173 | |||
174 | /** |
||
175 | * @param string $locale |
||
176 | * |
||
177 | * @return MessageCatalogue |
||
178 | */ |
||
179 | 6 | private function getCatalogue($locale) |
|
187 | |||
188 | /** |
||
189 | * Load catalogue from files. |
||
190 | * |
||
191 | * @param string $locale |
||
192 | * @param array $dirs |
||
193 | */ |
||
194 | 6 | private function loadCatalogue($locale, array $dirs) |
|
205 | } |
||
206 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: