Code Duplication    Length = 3-3 lines in 3 locations

convert.php 3 locations

@@ 9-11 (lines=3) @@
6
7
$rows = json_decode(file_get_contents(__DIR__ . '/lib/socicon/icons.json'), true);
8
9
foreach ($rows as $row) {
10
    echo 'const _' . mb_strtoupper($row['id']) . ' = \'' . $row['id'] . '\';' . PHP_EOL;
11
}
12
13
foreach ($rows as $row) {
14
    echo 'const _' . mb_strtoupper($row['id']) . '_CHAR = \'' . $row['character'] . '\';' . PHP_EOL;
@@ 13-15 (lines=3) @@
10
    echo 'const _' . mb_strtoupper($row['id']) . ' = \'' . $row['id'] . '\';' . PHP_EOL;
11
}
12
13
foreach ($rows as $row) {
14
    echo 'const _' . mb_strtoupper($row['id']) . '_CHAR = \'' . $row['character'] . '\';' . PHP_EOL;
15
}
16
17
foreach ($rows as $row) {
18
    echo 'const _' . mb_strtoupper($row['id']) . '_COLOR = \'' . $row['color'] . '\';' . PHP_EOL;
@@ 17-19 (lines=3) @@
14
    echo 'const _' . mb_strtoupper($row['id']) . '_CHAR = \'' . $row['character'] . '\';' . PHP_EOL;
15
}
16
17
foreach ($rows as $row) {
18
    echo 'const _' . mb_strtoupper($row['id']) . '_COLOR = \'' . $row['color'] . '\';' . PHP_EOL;
19
}