@@ -13,28 +13,45 @@ interface MemberList extends MemberContainer
1313{
1414 /**
1515 * Inserts members at the beginning of the list.
16+ *
17+ * This method MUST retain the state of the current instance, and return
18+ * an instance that contains the specified changes.
1619 */
1720 public function unshift (StructuredField ...$ members ): static ;
1821
1922 /**
2023 * Inserts members at the end of the list.
24+ *
25+ * This method MUST retain the state of the current instance, and return
26+ * an instance that contains the specified changes.
2127 */
2228 public function push (StructuredField ...$ members ): static ;
2329
2430 /**
2531 * Inserts members at the index.
2632 *
33+ * This method MUST retain the state of the current instance, and return
34+ * an instance that contains the specified changes.
35+ *
2736 * @throws InvalidOffset If the index does not exist
2837 */
2938 public function insert (int $ index , StructuredField ...$ members ): static ;
3039
3140 /**
3241 * Replaces the member associated with the index.
42+ *
43+ * This method MUST retain the state of the current instance, and return
44+ * an instance that contains the specified changes.
45+ *
46+ * @throws InvalidOffset If the index does not exist
3347 */
3448 public function replace (int $ index , StructuredField $ member ): static ;
3549
3650 /**
37- * Deletes members associated with the given indexes.
51+ * Deletes members associated with the list of submitted keys.
52+ *
53+ * This method MUST retain the state of the current instance, and return
54+ * an instance that contains the specified changes.
3855 */
3956 public function remove (int ...$ indexes ): static ;
4057}
0 commit comments