Code Duplication    Length = 3-3 lines in 2 locations

includes/general.php 1 location

@@ 1115-1117 (lines=3) @@
1112
  }
1113
1114
  try {
1115
    if ($planetrow['planet_type'] != PT_PLANET) {
1116
      throw new Exception(classLocale::$lang['ov_core_err_not_a_planet'], ERR_ERROR);
1117
    }
1118
1119
    if ($planetrow['density_index'] == ($new_density_index = sys_get_param_id('density_type'))) {
1120
      throw new Exception(classLocale::$lang['ov_core_err_same_density'], ERR_WARNING);

overview.php 1 location

@@ 79-81 (lines=3) @@
76
        $user = DBStaticUser::db_user_by_id($user['id'], true, '*');
77
        $planetrow = DBStaticPlanet::db_planet_by_id($planetrow['id'], true, '*');
78
79
        if($planetrow['planet_type'] != PT_PLANET) {
80
          throw new exception(classLocale::$lang['ov_capital_err_not_a_planet'], ERR_ERROR);
81
        }
82
83
        if($planetrow['id'] == $user['id_planet']) {
84
          throw new exception(classLocale::$lang['ov_capital_err_capital_already'], ERR_ERROR);