@@ -25,6 +25,8 @@ public static function createFromString(string $data): self
2525 }
2626
2727 /**
28+ * @param array<string,mixed> $data
29+ *
2830 * @throws SerializerException if $data could not be serialized to XML
2931 */
3032 public static function createFromArray (array $ data ): self
@@ -105,6 +107,11 @@ private function normalize(SimpleXMLElement $deserialized): void
105107 $ this ->normalized = JsonSerializer::createFromString ($ serialized )->getNormalized ();
106108 }
107109
110+ /**
111+ * @param array<mixed> $normalized
112+ *
113+ * @throws SerializerException
114+ */
108115 private function denormalize (array $ normalized ): void
109116 {
110117 $ this ->normalized = $ normalized ;
@@ -136,7 +143,10 @@ private function denormalize(array $normalized): void
136143 $ this ->encoded = $ this ->deserialized ->asXml ();
137144 }
138145
139- private function createXmlElement (string $ rootElementName , $ params ): SimpleXMLElement
146+ /**
147+ * @param array<mixed> $params
148+ */
149+ private function createXmlElement (string $ rootElementName , array $ params ): SimpleXMLElement
140150 {
141151 $ value = '' ;
142152 if (! is_array ($ params )) {
@@ -154,6 +164,10 @@ private function createXmlElement(string $rootElementName, $params): SimpleXMLEl
154164 return $ xml ;
155165 }
156166
167+ /**
168+ * @param string|int $k
169+ * @param mixed $v
170+ */
157171 private function addChildToXmlElement (SimpleXMLElement $ xml , $ k , $ v ): void
158172 {
159173 $ specialParams = [
@@ -196,8 +210,8 @@ private function addChildToXmlElement(SimpleXMLElement $xml, $k, $v): void
196210 /**
197211 * Attaches Custom Fields to XML element.
198212 *
199- * @param SimpleXMLElement $xml XML Element the custom fields are attached to
200- * @param array $fields array of fields to attach, each field needs name, id and value set
213+ * @param SimpleXMLElement $xml XML Element the custom fields are attached to
214+ * @param array<array<string>> $fields array of fields to attach, each field needs name, id and value set
201215 *
202216 * @see http://www.redmine.org/projects/redmine/wiki/Rest_api#Working-with-custom-fields
203217 */
0 commit comments