Completed
Push — work-fleets ( fff2b6...e0e753 )
by SuperNova.WS
06:54
created
includes/classes/FleetValidator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -871,8 +871,8 @@  discard block
 block discarded – undo
871 871
    */
872 872
   protected function checkACSInvited() {
873 873
     $playersInvited = !empty($this->fleet->acs['eingeladen']) ? explode(',', $this->fleet->acs['eingeladen']) : array();
874
-    foreach($playersInvited as $playerId) {
875
-      if(intval($playerId) == $this->fleet->dbOwnerRow['id']) {
874
+    foreach ($playersInvited as $playerId) {
875
+      if (intval($playerId) == $this->fleet->dbOwnerRow['id']) {
876 876
         return true;
877 877
       }
878 878
     }
@@ -959,9 +959,9 @@  discard block
 block discarded – undo
959 959
 
960 960
     // Retrieving flying fleets
961 961
     $objFleetsBashing = FleetList::dbGetFleetListBashing($user['id'], $this->fleet->dbTargetRow);
962
-    foreach($objFleetsBashing->_container as $fleetBashing) {
962
+    foreach ($objFleetsBashing->_container as $fleetBashing) {
963 963
       // Checking for ACS - each ACS count only once
964
-      if($fleetBashing->group_id) {
964
+      if ($fleetBashing->group_id) {
965 965
         $bashing_list["{$user['id']}_{$fleetBashing->group_id}"] = $fleetBashing->time_arrive_to_target;
966 966
       } else {
967 967
         $bashing_list[] = $fleetBashing->time_arrive_to_target;
@@ -969,12 +969,12 @@  discard block
 block discarded – undo
969 969
     }
970 970
 
971 971
     // Check for joining to ACS - if there are already fleets in ACS no checks should be done
972
-    if($this->fleet->mission_type == MT_ACS && $bashing_list["{$user['id']}_{$this->fleet->group_id}"]) {
972
+    if ($this->fleet->mission_type == MT_ACS && $bashing_list["{$user['id']}_{$this->fleet->group_id}"]) {
973 973
       return true;
974 974
     }
975 975
 
976 976
     $query = db_bashing_list_get($user, $this->fleet->dbTargetRow, $time_limit);
977
-    while($bashing_row = db_fetch($query)) {
977
+    while ($bashing_row = db_fetch($query)) {
978 978
       $bashing_list[] = $bashing_row['bashing_time'];
979 979
     }
980 980
 
@@ -983,9 +983,9 @@  discard block
 block discarded – undo
983 983
     $last_attack = 0;
984 984
     $wave = 0;
985 985
     $attack = 1;
986
-    foreach($bashing_list as &$bash_time) {
986
+    foreach ($bashing_list as &$bash_time) {
987 987
       $attack++;
988
-      if(
988
+      if (
989 989
         $bash_time - $last_attack > classSupernova::$config->fleet_bashing_interval
990 990
         ||
991 991
         $attack > classSupernova::$config->fleet_bashing_attacks
Please login to merge, or discard this patch.