Code Duplication    Length = 5-5 lines in 2 locations

src/Content/CPageContent.php 1 location

@@ 150-154 (lines=5) @@
147
            // Create level depending on the file id
148
            $id = substr($filename, 0, strpos($filename, '_'));
149
            $level = 2;
150
            if ($id % 100 === 0) {
151
                $level = 0;
152
            } elseif ($id % 10 === 0) {
153
                $level = 1;
154
            }
155
156
            $toc[$url] = [
157
                'title'     => $title,

src/Content/CFileBasedContent.php 1 location

@@ 119-123 (lines=5) @@
116
            // Create level depending on the file id
117
            $id = $matches[1];
118
            $level = 2;
119
            if ($id % 100 === 0) {
120
                $level = 0;
121
            } elseif ($id % 10 === 0) {
122
                $level = 1;
123
            }
124
125
            $index[$key] = [
126
                "file"    => $filepath,