Code Duplication    Length = 5-5 lines in 7 locations

src/plugins/onTick/notifications.php 7 locations

@@ 586-590 (lines=5) @@
583
                        case 152: // Sov bill
584
                            $msg = 'skip';
585
                            break;
586
                        case 160: // Entosis successful
587
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
588
                            $systemName = getSystemName($solarSystemID[0]);
589
                            $msg = "Hostile entosis successful. A structure in **{$systemName}** has entered reinforced mode.";
590
                            break;
591
                        case 161: //  Command Nodes Decloaking
592
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
593
                            $systemName = getSystemName($solarSystemID[0]);
@@ 591-595 (lines=5) @@
588
                            $systemName = getSystemName($solarSystemID[0]);
589
                            $msg = "Hostile entosis successful. A structure in **{$systemName}** has entered reinforced mode.";
590
                            break;
591
                        case 161: //  Command Nodes Decloaking
592
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
593
                            $systemName = getSystemName($solarSystemID[0]);
594
                            $msg = "Command nodes decloaking for **{$systemName}**";
595
                            break;
596
                        case 162: //  TCU Destroyed
597
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
598
                            $systemName = getSystemName($solarSystemID[0]);
@@ 596-600 (lines=5) @@
593
                            $systemName = getSystemName($solarSystemID[0]);
594
                            $msg = "Command nodes decloaking for **{$systemName}**";
595
                            break;
596
                        case 162: //  TCU Destroyed
597
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
598
                            $systemName = getSystemName($solarSystemID[0]);
599
                            $msg = "Entosis successful, TCU in **{$systemName}** has been destroyed.";
600
                            break;
601
                        case 163: //  Outpost freeport
602
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
603
                            $systemName = getSystemName($solarSystemID[0]);
@@ 601-605 (lines=5) @@
598
                            $systemName = getSystemName($solarSystemID[0]);
599
                            $msg = "Entosis successful, TCU in **{$systemName}** has been destroyed.";
600
                            break;
601
                        case 163: //  Outpost freeport
602
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
603
                            $systemName = getSystemName($solarSystemID[0]);
604
                            $msg = "Station in **{$systemName}** has now entered freeport mode.";
605
                            break;
606
                        case 165: //  System became Capital
607
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
608
                            $systemName = getSystemName($solarSystemID[0]);
@@ 613-617 (lines=5) @@
610
                            $allianceName = allianceName($allianceID);
611
                            $msg = "**{$systemName}** is now the capital for {$allianceName}.";
612
                            break;
613
                        case 167: //  Initiate Self-destruct on TCU
614
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
615
                            $systemName = getSystemName($solarSystemID[0]);
616
                            $msg = "TCU in **{$systemName}** has initiated a self destruct sequence.";
617
                            break;
618
                        case 169: //  TCU Self-Destructed
619
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
620
                            $systemName = getSystemName($solarSystemID[0]);
@@ 618-622 (lines=5) @@
615
                            $systemName = getSystemName($solarSystemID[0]);
616
                            $msg = "TCU in **{$systemName}** has initiated a self destruct sequence.";
617
                            break;
618
                        case 169: //  TCU Self-Destructed
619
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
620
                            $systemName = getSystemName($solarSystemID[0]);
621
                            $msg = "TCU in **{$systemName}** has self destructed.";
622
                            break;
623
                        case 181: // citadel low on fuel
624
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
625
                            $systemName = getSystemName($solarSystemID[0]);
@@ 649-653 (lines=5) @@
646
                            $systemName = getSystemName($solarSystemID[0]);
647
                            $msg = "@everyone | Citadel under attack in **{$systemName}** by **{$aggCharacterName}** ({$aggCorpName} / {$aggAllianceName}).";
648
                            break;
649
                        case 185: //  Citadel online
650
                            preg_match('/(?<=solarsystemID: )\S+/i', $notificationString, $solarSystemID);
651
                            $systemName = getSystemName($solarSystemID[0]);
652
                            $msg = "Citadel now online in **{$systemName}**.";
653
                            break;
654
                        case 188: //  Citadel destroyed
655
                            $corpID = trim(explode('- ', $notificationArray[3])[1]);
656
                            $corpName = corpName($corpID);