Code Duplication    Length = 11-11 lines in 2 locations

src/Command/CommandShowContent.php 1 location

@@ 54-64 (lines=11) @@
51
            $output->writeln(sprintf('<info>%s/</info>', $this->contentDir));
52
            $pages = $this->getPagesTree($output);
53
            //if ($this->getConsole()->isUtf8()) {
54
                $unicodeTreePrefix = function (RecursiveTreeIterator $tree) {
55
                    $prefixParts = [
56
                        RecursiveTreeIterator::PREFIX_LEFT         => ' ',
57
                        RecursiveTreeIterator::PREFIX_MID_HAS_NEXT => '│ ',
58
                        RecursiveTreeIterator::PREFIX_END_HAS_NEXT => '├ ',
59
                        RecursiveTreeIterator::PREFIX_END_LAST     => '└ ',
60
                    ];
61
                    foreach ($prefixParts as $part => $string) {
62
                        $tree->setPrefixPart($part, $string);
63
                    }
64
                };
65
                $unicodeTreePrefix($pages);
66
            //}
67
            foreach ($pages as $page) {

src/Command/ListContent.php 1 location

@@ 39-49 (lines=11) @@
36
            $this->wlAnnonce(sprintf('%s/', $this->contentDir));
37
            $pages = $this->getPagesTree();
38
            if ($this->getConsole()->isUtf8()) {
39
                $unicodeTreePrefix = function (RecursiveTreeIterator $tree) {
40
                    $prefixParts = [
41
                        RecursiveTreeIterator::PREFIX_LEFT         => ' ',
42
                        RecursiveTreeIterator::PREFIX_MID_HAS_NEXT => '│ ',
43
                        RecursiveTreeIterator::PREFIX_END_HAS_NEXT => '├ ',
44
                        RecursiveTreeIterator::PREFIX_END_LAST     => '└ ',
45
                    ];
46
                    foreach ($prefixParts as $part => $string) {
47
                        $tree->setPrefixPart($part, $string);
48
                    }
49
                };
50
                $unicodeTreePrefix($pages);
51
            }
52
            foreach ($pages as $page) {