1 | <?php |
||
25 | class FileStorage implements Storage |
||
26 | { |
||
27 | /** |
||
28 | * @var TranslationWriter |
||
29 | */ |
||
30 | private $writer; |
||
31 | |||
32 | /** |
||
33 | * @var TranslationLoader |
||
34 | */ |
||
35 | private $loader; |
||
36 | |||
37 | /** |
||
38 | * @var string directory path |
||
39 | */ |
||
40 | private $dir; |
||
41 | |||
42 | /** |
||
43 | * @var MessageCatalogue[] Fetched catalogies |
||
44 | */ |
||
45 | private $catalogues; |
||
46 | |||
47 | /** |
||
48 | * @param TranslationWriter $writer |
||
49 | * @param TranslationLoader $loader |
||
50 | * @param array $dir |
||
51 | */ |
||
52 | public function __construct(TranslationWriter $writer, TranslationLoader $loader, $dir) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function get($locale, $domain, $key) |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function create(Message $m) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function update(Message $m) |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function delete($locale, $domain, $key) |
||
105 | |||
106 | /** |
||
107 | * Save catalogue back to file. |
||
108 | * |
||
109 | * @param MessageCatalogue $catalogue |
||
110 | * @param string $domain |
||
111 | */ |
||
112 | private function writeCatalogue(MessageCatalogue $catalogue, $locale, $domain) |
||
122 | |||
123 | /** |
||
124 | * @param string $locale |
||
125 | * |
||
126 | * @return MessageCatalogue |
||
127 | */ |
||
128 | private function getCatalogue($locale) |
||
136 | |||
137 | /** |
||
138 | * Load catalogue from files. |
||
139 | * |
||
140 | * @param string $locale |
||
141 | * @param array $dirs |
||
142 | */ |
||
143 | private function loadCatalogue($locale, array $dirs) |
||
154 | } |
||
155 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..