Code Duplication    Length = 8-8 lines in 2 locations

includes/includes/flt_functions.php 1 location

@@ 119-126 (lines=8) @@
116
117
  // Retrieving flying fleets
118
  $objFleetsBashing = FleetList::dbGetFleetListBashing($user['id'], $planet_dst);
119
  foreach($objFleetsBashing->_container as $fleetBashing) {
120
    // Checking for ACS - each ACS count only once
121
    if($fleetBashing->group_id) {
122
      $bashing_list["{$user['id']}_{$fleetBashing->group_id}"] = $fleetBashing->time_arrive_to_target;
123
    } else {
124
      $bashing_list[] = $fleetBashing->time_arrive_to_target;
125
    }
126
  }
127
128
  // Check for joining to ACS - if there are already fleets in ACS no checks should be done
129
  if($mission == MT_ACS && $bashing_list["{$user['id']}_{$fleet_group}"]) {

classes/FleetValidator.php 1 location

@@ 1071-1078 (lines=8) @@
1068
1069
    // Retrieving flying fleets
1070
    $objFleetsBashing = FleetList::dbGetFleetListBashing($user['id'], $this->fleet->dbTargetRow);
1071
    foreach ($objFleetsBashing->_container as $fleetBashing) {
1072
      // Checking for ACS - each ACS count only once
1073
      if ($fleetBashing->group_id) {
1074
        $bashing_list["{$user['id']}_{$fleetBashing->group_id}"] = $fleetBashing->time_arrive_to_target;
1075
      } else {
1076
        $bashing_list[] = $fleetBashing->time_arrive_to_target;
1077
      }
1078
    }
1079
1080
    // Check for joining to ACS - if there are already fleets in ACS no checks should be done
1081
    if ($this->fleet->mission_type == MT_ACS && $bashing_list["{$user['id']}_{$this->fleet->group_id}"]) {