@@ -30,7 +30,7 @@ public function it_can_add_or_remove_members(): void
3030 {
3131 $ stringItem = Item::from ('helloWorld ' );
3232 $ booleanItem = Item::from (true );
33- $ instance = InnerList::fromMembers ($ stringItem , $ booleanItem );
33+ $ instance = InnerList::from ($ stringItem , $ booleanItem );
3434
3535 self ::assertCount (2 , $ instance );
3636 self ::assertTrue ($ instance ->has (1 ));
@@ -60,7 +60,7 @@ public function it_can_add_or_remove_members(): void
6060 #[Test]
6161 public function it_can_unshift_insert_and_replace (): void
6262 {
63- $ container = InnerList::fromMembers ()
63+ $ container = InnerList::from ()
6464 ->unshift ('42 ' )
6565 ->push (42 )
6666 ->insert (1 , 42.0 )
@@ -75,7 +75,7 @@ public function it_can_unshift_insert_and_replace(): void
7575 #[Test]
7676 public function it_returns_the_same_object_if_nothing_is_changed (): void
7777 {
78- $ container = InnerList::fromMembers (42 , 'forty-two ' );
78+ $ container = InnerList::from (42 , 'forty-two ' );
7979
8080 $ sameContainer = $ container
8181 ->unshift ()
@@ -90,21 +90,21 @@ public function it_fails_to_replace_invalid_index(): void
9090 {
9191 $ this ->expectException (InvalidOffset::class);
9292
93- InnerList::fromMembers ()->replace (0 , ByteSequence::fromDecoded ('Hello World ' ));
93+ InnerList::from ()->replace (0 , ByteSequence::fromDecoded ('Hello World ' ));
9494 }
9595
9696 #[Test]
9797 public function it_fails_to_insert_at_an_invalid_index (): void
9898 {
9999 $ this ->expectException (InvalidOffset::class);
100100
101- InnerList::fromMembers ()->insert (3 , ByteSequence::fromDecoded ('Hello World ' ));
101+ InnerList::from ()->insert (3 , ByteSequence::fromDecoded ('Hello World ' ));
102102 }
103103
104104 #[Test]
105105 public function it_fails_to_return_an_member_with_invalid_index (): void
106106 {
107- $ instance = InnerList::fromMembers ();
107+ $ instance = InnerList::from ();
108108
109109 self ::assertFalse ($ instance ->has (3 ));
110110
@@ -127,7 +127,7 @@ public function it_fails_to_access_unknown_parameter_values(): void
127127 {
128128 $ this ->expectException (StructuredFieldError::class);
129129
130- InnerList::fromMembers (false )->parameters ()->get ('bar ' )->value ();
130+ InnerList::from (false )->parameters ()->get ('bar ' )->value ();
131131 }
132132
133133 #[Test]
@@ -158,29 +158,29 @@ public function it_fails_to_insert_unknown_index_via_the_array_access_interface(
158158 {
159159 $ this ->expectException (StructuredFieldError::class);
160160
161- InnerList::fromMembers ()->insert (0 , Item::from (42.0 ));
161+ InnerList::from ()->insert (0 , Item::from (42.0 ));
162162 }
163163
164164 #[Test]
165165 public function it_returns_the_same_object_if_no_member_is_removed (): void
166166 {
167- self ::assertCount (0 , InnerList::fromMembers ()->remove (0 ));
167+ self ::assertCount (0 , InnerList::from ()->remove (0 ));
168168 }
169169
170170 #[Test]
171171 public function it_fails_to_fetch_an_value_using_an_integer (): void
172172 {
173173 $ this ->expectException (InvalidOffset::class);
174174
175- InnerList::fromMembers ()->get ('zero ' );
175+ InnerList::from ()->get ('zero ' );
176176 }
177177
178178 #[Test]
179179 public function it_can_access_the_item_value (): void
180180 {
181181 $ token = Token::fromString ('token ' );
182182 $ input = ['foobar ' , 0 , false , $ token ];
183- $ structuredField = InnerList::fromMembers (...$ input );
183+ $ structuredField = InnerList::from (...$ input );
184184
185185 self ::assertFalse ($ structuredField ->get (2 )->value ());
186186 self ::assertEquals ($ token , $ structuredField ->get (-1 )->value ());
@@ -223,7 +223,7 @@ public function it_can_create_via_parameters_access_methods_a_new_object(): void
223223 #[Test]
224224 public function it_implements_the_array_access_interface (): void
225225 {
226- $ structuredField = InnerList::fromMembers ('foobar ' , 'foobar ' , 'zero ' , 0 );
226+ $ structuredField = InnerList::from ('foobar ' , 'foobar ' , 'zero ' , 0 );
227227
228228 self ::assertInstanceOf (Item::class, $ structuredField ->get (0 ));
229229 self ::assertInstanceOf (Item::class, $ structuredField [0 ]);
@@ -236,22 +236,22 @@ public function it_forbids_removing_members_using_the_array_access_interface():
236236 {
237237 $ this ->expectException (LogicException::class);
238238
239- unset(InnerList::fromMembers ('foobar ' , 'foobar ' , 'zero ' , 0 )[0 ]);
239+ unset(InnerList::from ('foobar ' , 'foobar ' , 'zero ' , 0 )[0 ]);
240240 }
241241
242242 #[Test]
243243 public function it_forbids_adding_members_using_the_array_access_interface (): void
244244 {
245245 $ this ->expectException (LogicException::class);
246246
247- InnerList::fromMembers ('foobar ' , 'foobar ' , 'zero ' , 0 )[0 ] = Item::from (false );
247+ InnerList::from ('foobar ' , 'foobar ' , 'zero ' , 0 )[0 ] = Item::from (false );
248248 }
249249
250250
251251 #[Test]
252252 public function it_can_returns_the_container_member_keys (): void
253253 {
254- $ instance = InnerList::fromMembers ();
254+ $ instance = InnerList::from ();
255255
256256 self ::assertSame ([], $ instance ->keys ());
257257
@@ -260,7 +260,7 @@ public function it_can_returns_the_container_member_keys(): void
260260
261261 self ::assertSame ([0 , 1 ], $ newInstance ->keys ());
262262
263- $ container = InnerList::fromMembers ()
263+ $ container = InnerList::from ()
264264 ->unshift ('42 ' )
265265 ->push (42 )
266266 ->insert (1 , 42.0 )
0 commit comments