1 | <?php |
||
29 | class TranslationManager |
||
30 | { |
||
31 | /** |
||
32 | * @var Repository |
||
33 | */ |
||
34 | private $repository; |
||
35 | |||
36 | /** |
||
37 | * @var EventDispatcherInterface |
||
38 | */ |
||
39 | private $dispatcher; |
||
40 | |||
41 | /** |
||
42 | * @param Repository $repository |
||
43 | * @param EventDispatcherInterface $dispatcher |
||
44 | */ |
||
45 | public function __construct(Repository $repository, EventDispatcherInterface $dispatcher) |
||
50 | |||
51 | /** |
||
52 | * Edits object from translation. |
||
53 | * |
||
54 | * @param string $id |
||
55 | * @param Request $request Http request object. |
||
56 | */ |
||
57 | public function update($id, Request $request) |
||
85 | |||
86 | /** |
||
87 | * Returns all active tags from translations |
||
88 | * @return array |
||
89 | */ |
||
90 | public function getTags() |
||
94 | |||
95 | /** |
||
96 | * Returns all active domains from translations |
||
97 | * @return array |
||
98 | */ |
||
99 | public function getDomains() |
||
103 | |||
104 | /** |
||
105 | * @param string $id |
||
106 | * |
||
107 | * @return Translation |
||
108 | */ |
||
109 | public function get($id) |
||
113 | |||
114 | /** |
||
115 | * Returns all translations if filters are not specified |
||
116 | * |
||
117 | * @param array $filters An array with specified limitations for results |
||
118 | * |
||
119 | * @return DocumentIterator |
||
120 | */ |
||
121 | public function getAll(array $filters = null) |
||
135 | |||
136 | /** |
||
137 | * @param Translation[] $translations |
||
138 | */ |
||
139 | public function save($translations) |
||
147 | |||
148 | /** |
||
149 | * @param Translation $document |
||
150 | * @param array $messages |
||
151 | */ |
||
152 | private function updateMessages(Translation $document, array $messages) |
||
175 | |||
176 | /** |
||
177 | * @param Message $message |
||
178 | * @param string $locale |
||
179 | * @param string $text |
||
180 | * |
||
181 | * @return Message |
||
182 | */ |
||
183 | private function updateMessageData(Message $message, $locale, $text) |
||
192 | |||
193 | /** |
||
194 | * Returns a list of available tags or domains |
||
195 | * |
||
196 | * @param string $type |
||
197 | * @return array |
||
198 | */ |
||
199 | private function getItems($type) |
||
213 | } |
||
214 |
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: