@@ -74,7 +74,7 @@ public function test_get_nested_array_contains_keys()
7474 $ this ->assertArrayHasKey ('city ' , $ location );
7575 $ this ->assertArrayHasKey ('tel ' , $ location );
7676 $ this ->assertArrayHasKey ('state ' , $ location );
77-
77+
7878 $ state = $ this ->dot ['code.location.state ' ];
7979 $ this ->assertTrue (is_array ($ state ));
8080 $ this ->assertArrayHasKey ('code ' , $ state );
@@ -207,7 +207,7 @@ public function test_set_creates_nested_structure()
207207 $ dot = new Arraydotify ();
208208 $ dot ['app.name ' ] = 'MyApp ' ;
209209 $ this ->assertEquals ('MyApp ' , $ dot ['app.name ' ]);
210-
210+
211211 $ array = $ dot ->toArray ();
212212 $ this ->assertArrayHasKey ('app ' , $ array );
213213 $ this ->assertArrayHasKey ('name ' , $ array ['app ' ]);
@@ -219,7 +219,7 @@ public function test_set_deeply_nested_creates_path()
219219 $ dot = new Arraydotify ();
220220 $ dot ['level1.level2.level3.level4.value ' ] = 'deep ' ;
221221 $ this ->assertEquals ('deep ' , $ dot ['level1.level2.level3.level4.value ' ]);
222-
222+
223223 $ this ->assertTrue ($ dot ->has ('level1 ' ));
224224 $ this ->assertTrue ($ dot ->has ('level1.level2 ' ));
225225 $ this ->assertTrue ($ dot ->has ('level1.level2.level3 ' ));
@@ -230,7 +230,7 @@ public function test_set_array_value()
230230 {
231231 $ dot = new Arraydotify (['data ' => []]);
232232 $ dot ['data.items ' ] = ['apple ' , 'banana ' , 'orange ' ];
233-
233+
234234 $ items = $ dot ['data.items ' ];
235235 $ this ->assertIsArray ($ items );
236236 $ this ->assertCount (3 , $ items );
@@ -252,7 +252,7 @@ public function test_set_overwrites_nested_structure()
252252 'app ' => ['name ' => 'OldApp ' ]
253253 ]
254254 ]);
255-
255+
256256 $ dot ['config.app ' ] = 'NewValue ' ;
257257 $ this ->assertEquals ('NewValue ' , $ dot ['config.app ' ]);
258258 $ this ->assertFalse ($ dot ->has ('config.app.name ' ));
@@ -264,11 +264,11 @@ public function test_set_multiple_values_same_path()
264264 $ dot ['user.name ' ] = 'John ' ;
265265 $ dot ['user.email ' ] = 'john@example.com ' ;
266266 $ dot ['user.age ' ] = 30 ;
267-
267+
268268 $ this ->assertEquals ('John ' , $ dot ['user.name ' ]);
269269 $ this ->assertEquals ('john@example.com ' , $ dot ['user.email ' ]);
270270 $ this ->assertEquals (30 , $ dot ['user.age ' ]);
271-
271+
272272 $ user = $ dot ['user ' ];
273273 $ this ->assertIsArray ($ user );
274274 $ this ->assertCount (3 , $ user );
@@ -280,7 +280,7 @@ public function test_set_with_numeric_index()
280280 $ dot ['items.0 ' ] = 'first ' ;
281281 $ dot ['items.1 ' ] = 'second ' ;
282282 $ dot ['items.2 ' ] = 'third ' ;
283-
283+
284284 $ this ->assertEquals ('first ' , $ dot ['items.0 ' ]);
285285 $ this ->assertEquals ('second ' , $ dot ['items.1 ' ]);
286286 $ this ->assertEquals ('third ' , $ dot ['items.2 ' ]);
@@ -291,7 +291,7 @@ public function test_set_boolean_values()
291291 $ dot = new Arraydotify ();
292292 $ dot ['settings.enabled ' ] = true ;
293293 $ dot ['settings.disabled ' ] = false ;
294-
294+
295295 $ this ->assertTrue ($ dot ['settings.enabled ' ]);
296296 $ this ->assertFalse ($ dot ['settings.disabled ' ]);
297297 }
@@ -302,7 +302,7 @@ public function test_set_integer_and_float_values()
302302 $ dot ['numbers.integer ' ] = 42 ;
303303 $ dot ['numbers.float ' ] = 3.14 ;
304304 $ dot ['numbers.negative ' ] = -10 ;
305-
305+
306306 $ this ->assertSame (42 , $ dot ['numbers.integer ' ]);
307307 $ this ->assertSame (3.14 , $ dot ['numbers.float ' ]);
308308 $ this ->assertSame (-10 , $ dot ['numbers.negative ' ]);
@@ -316,9 +316,9 @@ public function test_set_preserves_existing_siblings()
316316 'version ' => '1.0 '
317317 ]
318318 ]);
319-
319+
320320 $ dot ['config.debug ' ] = true ;
321-
321+
322322 $ this ->assertEquals ('MyApp ' , $ dot ['config.app ' ]);
323323 $ this ->assertEquals ('1.0 ' , $ dot ['config.version ' ]);
324324 $ this ->assertTrue ($ dot ['config.debug ' ]);
@@ -328,11 +328,11 @@ public function test_set_updates_both_storage_and_origin()
328328 {
329329 $ dot = new Arraydotify ();
330330 $ dot ['new.path.value ' ] = 'test ' ;
331-
331+
332332 // Check dotified storage
333333 $ dotified = $ dot ->getDotified ();
334334 $ this ->assertArrayHasKey ('new.path.value ' , $ dotified );
335-
335+
336336 // Check original structure
337337 $ array = $ dot ->toArray ();
338338 $ this ->assertEquals ('test ' , $ array ['new ' ]['path ' ]['value ' ]);
@@ -351,7 +351,7 @@ public function test_set_zero_value()
351351 $ dot = new Arraydotify ();
352352 $ dot ['zero.int ' ] = 0 ;
353353 $ dot ['zero.float ' ] = 0.0 ;
354-
354+
355355 $ this ->assertSame (0 , $ dot ['zero.int ' ]);
356356 $ this ->assertSame (0.0 , $ dot ['zero.float ' ]);
357357 }
@@ -362,11 +362,11 @@ public function test_set_method_with_complex_path()
362362 $ dot ->set ('api.endpoints.users.list ' , '/api/v1/users ' );
363363 $ dot ->set ('api.endpoints.users.create ' , '/api/v1/users/create ' );
364364 $ dot ->set ('api.endpoints.posts.list ' , '/api/v1/posts ' );
365-
365+
366366 $ this ->assertEquals ('/api/v1/users ' , $ dot ->get ('api.endpoints.users.list ' ));
367367 $ this ->assertEquals ('/api/v1/users/create ' , $ dot ->get ('api.endpoints.users.create ' ));
368368 $ this ->assertEquals ('/api/v1/posts ' , $ dot ->get ('api.endpoints.posts.list ' ));
369-
369+
370370 $ endpoints = $ dot ['api.endpoints ' ];
371371 $ this ->assertIsArray ($ endpoints );
372372 $ this ->assertArrayHasKey ('users ' , $ endpoints );
0 commit comments