Code Duplication    Length = 11-11 lines in 3 locations

tests/Kint_ParserTest.php 3 locations

@@ 363-373 (lines=11) @@
360
361
            // Object with both and weak equality
362
            $this->assertEquals(2, $o7->size);
363
            foreach ($o7->value->contents as $o) {
364
                $this->assertContains($o->value->contents, array('value2', 'value3'));
365
366
                if ($o->value->contents === 'value2') {
367
                    $this->assertEquals('$v->{\'0\'}', $o->access_path);
368
                    $this->assertSame('0', $o->name);
369
                } elseif ($o->value->contents === 'value3') {
370
                    $this->assertEquals('$v->{\'\'}', $o->access_path);
371
                    $this->assertSame('', $o->name);
372
                }
373
            }
374
        } else {
375
            // Object from array
376
            $this->assertEquals(1, $o1->size);
@@ 405-415 (lines=11) @@
402
403
            // Object with both
404
            $this->assertEquals(2, $o5->size);
405
            foreach ($o5->value->contents as $o) {
406
                $this->assertContains($o->value->contents, array('value', 'value2'));
407
408
                if ($o->value->contents === 'value') {
409
                    $this->assertEquals('array_values((array) $v)[0]', $o->access_path);
410
                    $this->assertSame(0, $o->name);
411
                } elseif ($o->value->contents === 'value2') {
412
                    $this->assertEquals('$v->{\'0\'}', $o->access_path);
413
                    $this->assertSame('0', $o->name);
414
                }
415
            }
416
417
            // Array with both
418
            $this->assertEquals(2, $o6->size);
@@ 419-429 (lines=11) @@
416
417
            // Array with both
418
            $this->assertEquals(2, $o6->size);
419
            foreach ($o6->value->contents as $o) {
420
                $this->assertContains($o->value->contents, array('value', 'value2'));
421
422
                if ($o->value->contents === 'value') {
423
                    $this->assertEquals('array_values($v)[0]', $o->access_path);
424
                    $this->assertSame('0', $o->name);
425
                } elseif ($o->value->contents === 'value2') {
426
                    $this->assertEquals('$v[0]', $o->access_path);
427
                    $this->assertSame(0, $o->name);
428
                }
429
            }
430
        }
431
    }
432