Code Duplication    Length = 14-14 lines in 2 locations

src/plugins/onTick/authCheck.php 2 locations

@@ 266-279 (lines=14) @@
263
								}
264
							} elseif ($authGroup['corpID'] !== 0 || $authGroup['allianceID'] !== 0) {
265
								//Check if corpID matches
266
								if ($corpID === $authGroup['corpID']) {
267
									foreach ($roles as $role) {
268
										if ((string) $role->name === (string) $authGroup['corpMemberRole']) {
269
											$member->addRole($role);
270
											$role = 'corp';
271
											$guild->members->save($member);
272
											// Deactivate user in database
273
											$sql = "UPDATE authUsers SET active='yes' WHERE discordID='$discordID'";
274
											$this->logger->addInfo("AuthCheck: {$eveName} account has been deactivated as they are in correct corp/alliance.");
275
											$conn->query($sql);
276
										}
277
									}
278
									break;
279
								}
280
								//Check if allianceID matches
281
								if ($allianceID === $authGroup['allianceID'] && $authGroup['allianceID'] !== 0) {
282
									foreach ($roles as $role) {
@@ 281-294 (lines=14) @@
278
									break;
279
								}
280
								//Check if allianceID matches
281
								if ($allianceID === $authGroup['allianceID'] && $authGroup['allianceID'] !== 0) {
282
									foreach ($roles as $role) {
283
										if ((string) $role->name === (string) $authGroup['allyMemberRole']) {
284
											$member->addRole($role);
285
											$role = 'ally';
286
											$guild->members->save($member);
287
											// Deactivate user in database
288
											$sql = "UPDATE authUsers SET active='yes' WHERE discordID='$discordID'";
289
											$this->logger->addInfo("AuthCheck: {$eveName} account has been deactivated as they are in correct corp/alliance.");
290
											$conn->query($sql);
291
										}
292
									}
293
									break;
294
								}
295
							}
296
						}
297
					}