1 | <?php |
||
29 | class TranslationManager |
||
30 | { |
||
31 | /** |
||
32 | * @var Repository |
||
33 | */ |
||
34 | private $repository; |
||
35 | |||
36 | /** |
||
37 | * @var HistoryManager |
||
38 | */ |
||
39 | private $historyManager; |
||
40 | |||
41 | /** |
||
42 | * @var EventDispatcherInterface |
||
43 | */ |
||
44 | private $dispatcher; |
||
45 | |||
46 | /** |
||
47 | * @param Repository $repository Translation repository service. |
||
48 | * @param HistoryManager $manager History manager service. |
||
49 | * @param EventDispatcherInterface $dispatcher |
||
50 | */ |
||
51 | public function __construct(Repository $repository, HistoryManager $manager, EventDispatcherInterface $dispatcher) |
||
57 | |||
58 | /** |
||
59 | * Edits object from translation. |
||
60 | * |
||
61 | * @param string $id |
||
62 | * @param Request $request Http request object. |
||
63 | */ |
||
64 | public function edit($id, Request $request) |
||
92 | |||
93 | /** |
||
94 | * Returns all active tags from translations |
||
95 | * @return array |
||
96 | */ |
||
97 | public function getTags() |
||
101 | |||
102 | /** |
||
103 | * Returns all active domains from translations |
||
104 | * @return array |
||
105 | */ |
||
106 | public function getDomains() |
||
110 | |||
111 | /** |
||
112 | * @param string $id |
||
113 | * |
||
114 | * @return Translation|object |
||
115 | */ |
||
116 | public function get($id) |
||
120 | |||
121 | /** |
||
122 | * Returns all translations if filters are not specified |
||
123 | * |
||
124 | * @param array $filters An array with specified limitations for results |
||
125 | * |
||
126 | * @return DocumentIterator |
||
127 | */ |
||
128 | public function getAll(array $filters = null) |
||
142 | |||
143 | /** |
||
144 | * @param Translation[] $translations |
||
145 | */ |
||
146 | public function save($translations) |
||
154 | |||
155 | /** |
||
156 | * @param Translation $document |
||
157 | * @param array $messages |
||
158 | */ |
||
159 | private function updateMessages(Translation $document, array $messages) |
||
182 | |||
183 | /** |
||
184 | * @param Message $message |
||
185 | * @param string $locale |
||
186 | * @param string $text |
||
187 | * @param \DateTime $updatedAt |
||
188 | * |
||
189 | * @return Message |
||
190 | */ |
||
191 | private function updateMessageData(Message $message, $locale, $text, $updatedAt = null) |
||
203 | |||
204 | /** |
||
205 | * Returns a list of available tags or domains. |
||
206 | * |
||
207 | * @param string $type |
||
208 | * |
||
209 | * @return array |
||
210 | */ |
||
211 | private function getGroupTypeInfo($type) |
||
225 | } |
||
226 |
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: