Code Duplication    Length = 5-5 lines in 9 locations

src/plugins/onTick/notifications.php 9 locations

@@ 185-189 (lines=5) @@
182
                    $notificationString = explode("\n", $this->getNotificationText($keyID, $vCode, $characterID,
183
                        $notificationID));
184
                    switch ($typeID) {
185
                        case 5: // War Declared
186
                            $aggAllianceID = trim(explode(": ", $notificationString[2])[1]);
187
                            $aggAllianceName = apiCharacterName($aggAllianceID);
188
                            $msg = "@everyone | War declared by {$aggAllianceName}. Fighting begins in roughly 24 hours.";
189
                            break;
190
                        case 7: // War Declared corp
191
                            $aggCorpID = trim(explode(": ", $notificationString[2])[1]);
192
                            $aggCorpName = apiCharacterName($aggCorpID);
@@ 190-194 (lines=5) @@
187
                            $aggAllianceName = apiCharacterName($aggAllianceID);
188
                            $msg = "@everyone | War declared by {$aggAllianceName}. Fighting begins in roughly 24 hours.";
189
                            break;
190
                        case 7: // War Declared corp
191
                            $aggCorpID = trim(explode(": ", $notificationString[2])[1]);
192
                            $aggCorpName = apiCharacterName($aggCorpID);
193
                            $msg = "@everyone | War declared by {$aggCorpName}. Fighting begins in roughly 24 hours.";
194
                            break;
195
                        case 8: // Alliance war invalidated by CONCORD
196
                            $aggAllianceID = trim(explode(": ", $notificationString[2])[1]);
197
                            $aggAllianceName = apiCharacterName($aggAllianceID);
@@ 195-199 (lines=5) @@
192
                            $aggCorpName = apiCharacterName($aggCorpID);
193
                            $msg = "@everyone | War declared by {$aggCorpName}. Fighting begins in roughly 24 hours.";
194
                            break;
195
                        case 8: // Alliance war invalidated by CONCORD
196
                            $aggAllianceID = trim(explode(": ", $notificationString[2])[1]);
197
                            $aggAllianceName = apiCharacterName($aggAllianceID);
198
                            $msg = "War with {$aggAllianceName} has been invalidated. Fighting ends in roughly 24 hours.";
199
                            break;
200
                        case 10: // Bill issued
201
                            $msg = "skip";
202
                            break;
@@ 222-226 (lines=5) @@
219
                        case 21: // member left corp
220
                            $msg = "skip";
221
                            break;
222
                        case 31: // Alliance war invalidated by CONCORD
223
                            $aggAllianceID = trim(explode(": ", $notificationString[2])[1]);
224
                            $aggAllianceName = apiCharacterName($aggAllianceID);
225
                            $msg = "War with {$aggAllianceName} has been invalidated. Fighting ends in roughly 24 hours.";
226
                            break;
227
                        case 35: // Insurance payment
228
                            $msg = "skip";
229
                            break;
@@ 366-370 (lines=5) @@
363
                            $typeName = apiTypeName($typeID);
364
                            $msg = "Entosis has disabled a module in **{$systemName}** on **{$typeName}** (Date: **{$sentDate}**)";
365
                            break;
366
                        case 160: // Entosis successful
367
                            $solarSystemID = trim(explode(": ", $notificationString[2])[1]);
368
                            $systemName = apiCharacterName($solarSystemID);
369
                            $msg = "Hostile entosis successful. A structure in **{$systemName}** has entered reinforced mode.";
370
                            break;
371
                        case 161: //  Command Nodes Decloaking
372
                            $solarSystemID = trim(explode(": ", $notificationString[2])[1]);
373
                            $systemName = apiCharacterName($solarSystemID);
@@ 371-375 (lines=5) @@
368
                            $systemName = apiCharacterName($solarSystemID);
369
                            $msg = "Hostile entosis successful. A structure in **{$systemName}** has entered reinforced mode.";
370
                            break;
371
                        case 161: //  Command Nodes Decloaking
372
                            $solarSystemID = trim(explode(": ", $notificationString[2])[1]);
373
                            $systemName = apiCharacterName($solarSystemID);
374
                            $msg = "Command nodes decloaking for **{$systemName}**";
375
                            break;
376
                        case 162: //  TCU Destroyed
377
                            $solarSystemID = trim(explode(": ", $notificationString[0])[1]);
378
                            $systemName = apiCharacterName($solarSystemID);
@@ 376-380 (lines=5) @@
373
                            $systemName = apiCharacterName($solarSystemID);
374
                            $msg = "Command nodes decloaking for **{$systemName}**";
375
                            break;
376
                        case 162: //  TCU Destroyed
377
                            $solarSystemID = trim(explode(": ", $notificationString[0])[1]);
378
                            $systemName = apiCharacterName($solarSystemID);
379
                            $msg = "Entosis successful, TCU in **{$systemName}** has been destroyed.";
380
                            break;
381
                        case 163: //  Outpost freeport
382
                            $solarSystemID = trim(explode(": ", $notificationString[1])[1]);
383
                            $systemName = apiCharacterName($solarSystemID);
@@ 381-385 (lines=5) @@
378
                            $systemName = apiCharacterName($solarSystemID);
379
                            $msg = "Entosis successful, TCU in **{$systemName}** has been destroyed.";
380
                            break;
381
                        case 163: //  Outpost freeport
382
                            $solarSystemID = trim(explode(": ", $notificationString[1])[1]);
383
                            $systemName = apiCharacterName($solarSystemID);
384
                            $msg = "Station in **{$systemName}** has now entered freeport mode.";
385
                            break;
386
                        case 182: //  Citadel being anchored
387
                            $corpName = trim(explode(": ", $notificationString[1])[1]);
388
                            $solarSystemID = trim(explode(": ", $notificationString[2])[1]);
@@ 403-407 (lines=5) @@
400
                            $systemName = apiCharacterName($solarSystemID);
401
                            $msg = "@everyone | Citadel under attack in **{$systemName}** by **{$aggCharacterName}** ({$aggCorpName} / {$aggAllianceName}).";
402
                            break;
403
                        case 185: //  Citadel online
404
                            $solarSystemID = trim(explode(": ", $notificationString[0])[1]);
405
                            $systemName = apiCharacterName($solarSystemID);
406
                            $msg = "Citadel now online in **{$systemName}**.";
407
                            break;
408
                        case 188: //  Citadel destroyed
409
                            $corpID = trim(explode("- ", $notificationString[3])[1]);
410
                            $corpName = apiCharacterName($corpID);