1 | <?php |
||
17 | class FilesystemUpdater |
||
18 | { |
||
19 | /** |
||
20 | * @var LoaderInterface loader |
||
21 | */ |
||
22 | private $loader; |
||
23 | |||
24 | /** |
||
25 | * @var DumperInterface dumper |
||
26 | */ |
||
27 | private $dumper; |
||
28 | |||
29 | /** |
||
30 | * @var string targetDir |
||
31 | */ |
||
32 | private $targetDir; |
||
33 | |||
34 | /** |
||
35 | * @var string fileExtension |
||
36 | */ |
||
37 | private $fileExtension; |
||
38 | |||
39 | /** |
||
40 | * @var Message[] messages |
||
41 | */ |
||
42 | private $messages; |
||
43 | |||
44 | /** |
||
45 | * @var bool |
||
46 | */ |
||
47 | private $syncEmptyTranslations; |
||
48 | |||
49 | /** |
||
50 | * Filesystem constructor. |
||
51 | * |
||
52 | * @param LoaderInterface $loader |
||
53 | * @param DumperInterface $dumper |
||
54 | * @param string $targetDir |
||
55 | * @param string $fileExtension |
||
56 | * @param bool $syncEmptyTranslations |
||
57 | */ |
||
58 | 1 | public function __construct(LoaderInterface $loader, DumperInterface $dumper, $targetDir, $fileExtension, $syncEmptyTranslations = true) |
|
67 | |||
68 | /** |
||
69 | * Returns translation file type. |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getFileExtension() |
||
77 | |||
78 | /** |
||
79 | * @param string $fileName |
||
80 | * @param string $data the file contents |
||
81 | */ |
||
82 | public function writeToFile($fileName, $data) |
||
90 | |||
91 | /** |
||
92 | * Update message catalogues. |
||
93 | * |
||
94 | * @param Message[] $messages |
||
95 | */ |
||
96 | public function updateMessageCatalog(array $messages) |
||
100 | |||
101 | /** |
||
102 | * Update the file system after the Response has been sent back to the client. |
||
103 | * |
||
104 | * @param Event $event |
||
105 | * |
||
106 | * @throws \ErrorException |
||
107 | * @throws \Exception |
||
108 | */ |
||
109 | public function onTerminate(Event $event) |
||
151 | |||
152 | /** |
||
153 | * @return string |
||
154 | */ |
||
155 | public function getTargetDir() |
||
159 | } |
||
160 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.