1 | <?php |
||
30 | class TranslationManager |
||
31 | { |
||
32 | /** |
||
33 | * @var Repository |
||
34 | */ |
||
35 | private $repository; |
||
36 | |||
37 | /** |
||
38 | * @var EventDispatcherInterface |
||
39 | */ |
||
40 | private $dispatcher; |
||
41 | |||
42 | /** |
||
43 | * @param Repository $repository |
||
44 | * @param EventDispatcherInterface $dispatcher |
||
45 | */ |
||
46 | public function __construct(Repository $repository, EventDispatcherInterface $dispatcher) |
||
51 | |||
52 | /** |
||
53 | * @param string $id |
||
54 | * |
||
55 | * @return Translation |
||
56 | */ |
||
57 | public function get($id) |
||
61 | |||
62 | /** |
||
63 | * Returns all active tags from translations |
||
64 | * @return array |
||
65 | */ |
||
66 | public function getTags() |
||
70 | |||
71 | /** |
||
72 | * Returns all active domains from translations |
||
73 | * @return array |
||
74 | */ |
||
75 | public function getDomains() |
||
79 | |||
80 | /** |
||
81 | * Returns all translations if filters are not specified |
||
82 | * |
||
83 | * @param array $filters An array with specified limitations for results |
||
84 | * |
||
85 | * @return DocumentIterator |
||
86 | */ |
||
87 | public function getAll(array $filters = null) |
||
101 | |||
102 | /** |
||
103 | * Edits object from translation. |
||
104 | * |
||
105 | * @param string $id |
||
106 | * @param Request $request Http request object. |
||
107 | */ |
||
108 | public function update($id, Request $request) |
||
137 | |||
138 | /** |
||
139 | * @param Translation[] $translations |
||
140 | */ |
||
141 | public function save($translations) |
||
149 | |||
150 | /** |
||
151 | * @param Translation $document |
||
152 | * @param array $messages |
||
153 | */ |
||
154 | private function updateMessages(Translation $document, array $messages) |
||
176 | |||
177 | /** |
||
178 | * @param Message $message |
||
179 | * @param string $locale |
||
180 | * @param string $text |
||
181 | * |
||
182 | * @return Message |
||
183 | */ |
||
184 | private function updateMessageData(Message $message, $locale, $text) |
||
193 | |||
194 | /** |
||
195 | * Returns a list of available tags or domains |
||
196 | * |
||
197 | * @param string $type |
||
198 | * @return array |
||
199 | */ |
||
200 | private function getItems($type) |
||
214 | } |
||
215 |
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: