1 | <?php |
||
31 | class TranslationManager |
||
32 | { |
||
33 | /** |
||
34 | * @var Repository |
||
35 | */ |
||
36 | private $repository; |
||
37 | |||
38 | /** |
||
39 | * @var HistoryManager |
||
40 | */ |
||
41 | private $historyManager; |
||
42 | |||
43 | /** |
||
44 | * @var EventDispatcherInterface |
||
45 | */ |
||
46 | private $dispatcher; |
||
47 | |||
48 | /** |
||
49 | * @param Repository $repository |
||
50 | * @param HistoryManager $manager |
||
51 | * @param EventDispatcherInterface $dispatcher |
||
52 | */ |
||
53 | public function __construct(Repository $repository, HistoryManager $manager, EventDispatcherInterface $dispatcher) |
||
59 | |||
60 | /** |
||
61 | * Edits object from translation. |
||
62 | * |
||
63 | * @param string $id |
||
64 | * @param Request $request Http request object. |
||
65 | */ |
||
66 | public function edit($id, Request $request) |
||
94 | |||
95 | /** |
||
96 | * Returns all active tags from translations |
||
97 | * @return array |
||
98 | */ |
||
99 | public function getTags() |
||
103 | |||
104 | /** |
||
105 | * Returns all active domains from translations |
||
106 | * @return array |
||
107 | */ |
||
108 | public function getDomains() |
||
112 | |||
113 | /** |
||
114 | * @param string $id |
||
115 | * |
||
116 | * @return Translation |
||
117 | */ |
||
118 | public function getTranslation($id) |
||
122 | |||
123 | /** |
||
124 | * Returns all translations if filters are not specified |
||
125 | * |
||
126 | * @param array $filters An array with specified limitations for results |
||
127 | * |
||
128 | * @return DocumentIterator |
||
129 | */ |
||
130 | public function getTranslations(array $filters = null) |
||
144 | |||
145 | /** |
||
146 | * @param Translation[] $translations |
||
147 | */ |
||
148 | public function saveTranslations($translations) |
||
156 | |||
157 | /** |
||
158 | * @param Translation $document |
||
159 | * @param array $messages |
||
160 | */ |
||
161 | private function updateMessages(Translation $document, array $messages) |
||
189 | |||
190 | /** |
||
191 | * @param Message $message |
||
192 | * @param string $locale |
||
193 | * @param string $text |
||
194 | * @param \DateTime $updatedAt |
||
195 | * |
||
196 | * @return Message |
||
197 | */ |
||
198 | private function updateMessageData(Message $message, $locale, $text, $updatedAt = null) |
||
210 | |||
211 | /** |
||
212 | * Returns a list of available tags or domains |
||
213 | * |
||
214 | * @param string $type |
||
215 | * @return array |
||
216 | */ |
||
217 | private function getItems($type) |
||
231 | } |
||
232 |
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: