Code Duplication    Length = 8-8 lines in 3 locations

tests/BuilderTest.php 2 locations

@@ 392-399 (lines=8) @@
389
            return $factory->build();
390
        });
391
        
392
        $builder->insertAfter('index', function (Builder $builder) {
393
            $builder->create('users', Link::class, function(LinkFactory $factory) {
394
                $factory->title = 'Users';
395
                $factory->url = url('users');
396
397
                return $factory->build();
398
            });
399
        });
400
        
401
        $builder->insertBefore('users', function (Builder $builder) {
402
            $builder->create('profile', Link::class, function(LinkFactory $factory) {
@@ 401-408 (lines=8) @@
398
            });
399
        });
400
        
401
        $builder->insertBefore('users', function (Builder $builder) {
402
            $builder->create('profile', Link::class, function(LinkFactory $factory) {
403
                $factory->title = 'Profile';
404
                $factory->url = url('profile');
405
406
                return $factory->build();
407
            });
408
        });
409
410
        $this->assertEquals($this->getStub('insert.html'), $builder->render('another'));
411
    }

tests/MenuTest.php 1 location

@@ 27-34 (lines=8) @@
24
    {
25
        /** @var Menu $menu */
26
        $menu = $this->app->makeWith(Menu::class, ['container' => $this->app]);
27
        $menu->make('test', function(Builder $builder) {
28
            $builder->create('one', Link::class, function(LinkFactory $factory) {
29
                $factory->title = 'One';
30
                $factory->url = '/one';
31
32
                return $factory->build();
33
            });
34
        });
35
        
36
        return $menu;
37
    }