Completed
Push — trunk ( 8dcff2...338765 )
by SuperNova.WS
04:11
created
classes/Fleet/RecordFleet.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
    * @inheritdoc
104 104
    */
105 105
   public function update() {
106
-    if($this->getShipCount() < 1) {
106
+    if ($this->getShipCount() < 1) {
107 107
       return $this->delete();
108 108
     } else {
109 109
       return parent::update();
@@ -167,12 +167,12 @@  discard block
 block discarded – undo
167 167
 
168 168
     $shipCount = floor($shipCount);
169 169
 
170
-    if($this->shipList[$shipSnId] + $shipCount < 0) {
170
+    if ($this->shipList[$shipSnId] + $shipCount < 0) {
171 171
       throw new \Exception("Trying to deduct more ships [{$shipSnId}] '{$shipCount}' when fleet has only {$this->shipList[$shipSnId]}");
172 172
     }
173 173
 
174 174
     $this->shipList[$shipSnId] += $shipCount;
175
-    if($this->shipList[$shipSnId] < 1) {
175
+    if ($this->shipList[$shipSnId] < 1) {
176 176
       unset($this->shipList[$shipSnId]);
177 177
     }
178 178
 
@@ -187,13 +187,13 @@  discard block
 block discarded – undo
187 187
    * @throws \Exception
188 188
    */
189 189
   public function changeResource($resourceId, $resourceCount) {
190
-    if(!array_key_exists($resourceId, $this->resources) || empty($resourceCount)) {
190
+    if (!array_key_exists($resourceId, $this->resources) || empty($resourceCount)) {
191 191
       return;
192 192
     }
193 193
 
194 194
     $resourceCount = ceil($resourceCount);
195 195
 
196
-    if($this->resources[$resourceId] + $resourceCount < 0) {
196
+    if ($this->resources[$resourceId] + $resourceCount < 0) {
197 197
       throw new \Exception("Trying to deduct more resources [{$resourceId}] '{$resourceCount}' when fleet has only {$this->resources[$resourceId]}");
198 198
     }
199 199
 
Please login to merge, or discard this patch.
classes/Core/GlobalContainer.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -91,99 +91,99 @@
 block discarded – undo
91 91
 
92 92
     // Services --------------------------------------------------------------------------------------------------------
93 93
     // Default db
94
-    $gc->db = function (GlobalContainer $c) {
94
+    $gc->db = function(GlobalContainer $c) {
95 95
       SN::$db = new \DBAL\db_mysql($c);
96 96
 
97 97
       return SN::$db;
98 98
     };
99 99
 
100
-    $gc->debug = function (/** @noinspection PhpUnusedParameterInspection */
100
+    $gc->debug = function(/** @noinspection PhpUnusedParameterInspection */
101 101
       GlobalContainer $c) {
102 102
       return new \debug();
103 103
     };
104 104
 
105
-    $gc->cache = function (GlobalContainer $gc) {
105
+    $gc->cache = function(GlobalContainer $gc) {
106 106
       return new \classCache($gc->cachePrefix);
107 107
     };
108 108
 
109
-    $gc->config = function (GlobalContainer $gc) {
109
+    $gc->config = function(GlobalContainer $gc) {
110 110
       return new \classConfig($gc->cachePrefix);
111 111
     };
112 112
 
113 113
 
114
-    $gc->repository = function (GlobalContainer $gc) {
114
+    $gc->repository = function(GlobalContainer $gc) {
115 115
       return new Repository($gc);
116 116
     };
117 117
 
118
-    $gc->storage = function (GlobalContainer $gc) {
118
+    $gc->storage = function(GlobalContainer $gc) {
119 119
       return new \Storage($gc);
120 120
     };
121 121
 
122
-    $gc->repoV2 = function (GlobalContainer $gc) {
122
+    $gc->repoV2 = function(GlobalContainer $gc) {
123 123
       return new RepoV2($gc);
124 124
     };
125 125
 
126
-    $gc->storageV2 = function (GlobalContainer $gc) {
126
+    $gc->storageV2 = function(GlobalContainer $gc) {
127 127
       return new StorageV2($gc);
128 128
     };
129 129
 
130
-    $gc->design = function (GlobalContainer $gc) {
130
+    $gc->design = function(GlobalContainer $gc) {
131 131
       return new \Design($gc);
132 132
     };
133 133
 
134
-    $gc->bbCodeParser = function (GlobalContainer $gc) {
134
+    $gc->bbCodeParser = function(GlobalContainer $gc) {
135 135
       return new \BBCodeParser($gc);
136 136
     };
137 137
 
138
-    $gc->fleetDispatcher = function (GlobalContainer $gc) {
138
+    $gc->fleetDispatcher = function(GlobalContainer $gc) {
139 139
       return new \Fleet\FleetDispatcher($gc);
140 140
     };
141 141
 
142
-    $gc->watchdog = function (GlobalContainer $gc) {
142
+    $gc->watchdog = function(GlobalContainer $gc) {
143 143
       return new Watchdog($gc);
144 144
     };
145 145
 
146
-    $gc->valueStorage = function (GlobalContainer $gc) {
146
+    $gc->valueStorage = function(GlobalContainer $gc) {
147 147
       return new ValueStorage([]);
148 148
     };
149 149
 
150
-    $gc->bonusCatalog = function (GlobalContainer $gc) {
150
+    $gc->bonusCatalog = function(GlobalContainer $gc) {
151 151
       return new BonusCatalog($gc);
152 152
     };
153 153
 
154
-    $gc->general = function (GlobalContainer $gc) {
154
+    $gc->general = function(GlobalContainer $gc) {
155 155
       return new General($gc);
156 156
     };
157 157
 
158
-    $gc->economicHelper = function (GlobalContainer $gc) {
158
+    $gc->economicHelper = function(GlobalContainer $gc) {
159 159
       return new EconomicHelper($gc);
160 160
     };
161 161
 
162
-    $gc->playerLevelHelper = function (GlobalContainer $gc) {
162
+    $gc->playerLevelHelper = function(GlobalContainer $gc) {
163 163
       return new PlayerLevelHelper($gc);
164 164
     };
165 165
 
166
-    $gc->pimp = function (GlobalContainer $gc) {
166
+    $gc->pimp = function(GlobalContainer $gc) {
167 167
       return new SnPimp($gc);
168 168
     };
169 169
 
170
-    $gc->modules = function (GlobalContainer $gc) {
170
+    $gc->modules = function(GlobalContainer $gc) {
171 171
       return new ModulesManager($gc);
172 172
     };
173 173
 
174 174
     // Dummy objects ---------------------------------------------------------------------------------------------------
175
-    $gc->theUser = function (GlobalContainer $gc) {
175
+    $gc->theUser = function(GlobalContainer $gc) {
176 176
       return new \TheUser($gc);
177 177
     };
178 178
 
179 179
 
180 180
     // Models ----------------------------------------------------------------------------------------------------------
181 181
     $gc->skinEntityClass = \SkinV2::class;
182
-    $gc->skinModel = function (GlobalContainer $gc) {
182
+    $gc->skinModel = function(GlobalContainer $gc) {
183 183
       return new \SkinModel($gc);
184 184
     };
185 185
 
186
-    $gc->textModel = function (GlobalContainer $gc) {
186
+    $gc->textModel = function(GlobalContainer $gc) {
187 187
       return new \TextModel($gc);
188 188
     };
189 189
 
Please login to merge, or discard this patch.
classes/Core/EntityDb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
      */
80 80
     $className = $this->_activeClass;
81 81
     $container = $className::findById($id);
82
-    if(!empty($container)) {
82
+    if (!empty($container)) {
83 83
       $this->_isNew = false;
84 84
       $this->_container = $container;
85 85
     }
Please login to merge, or discard this patch.
includes/vars.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -595,29 +595,29 @@  discard block
 block discarded – undo
595 595
         P_MISSION_EXPEDITION_OUTCOME           => FLT_EXPEDITION_OUTCOME_FOUND_FLEET,
596 596
         P_MISSION_EXPEDITION_OUTCOME_TYPE      => FLT_EXPEDITION_OUTCOME_TYPE_GOOD,
597 597
         P_CHANCE                               => 200,
598
-        'percent'                              => [0 => 0.1, 1 => 0.02, 2 => 0.01,],
598
+        'percent'                              => [0 => 0.1, 1 => 0.02, 2 => 0.01, ],
599 599
         P_MISSION_EXPEDITION_OUTCOME_SECONDARY => [
600
-          [P_CHANCE => 90, P_MULTIPLIER => 0.01, P_MESSAGE_ID => 2,],
601
-          [P_CHANCE => 9, P_MULTIPLIER => 0.02, P_MESSAGE_ID => 1,],
602
-          [P_CHANCE => 1, P_MULTIPLIER => 0.10, P_MESSAGE_ID => 0,],
600
+          [P_CHANCE => 90, P_MULTIPLIER => 0.01, P_MESSAGE_ID => 2, ],
601
+          [P_CHANCE => 9, P_MULTIPLIER => 0.02, P_MESSAGE_ID => 1, ],
602
+          [P_CHANCE => 1, P_MULTIPLIER => 0.10, P_MESSAGE_ID => 0, ],
603 603
         ],
604 604
       ],
605 605
       FLT_EXPEDITION_OUTCOME_FOUND_RESOURCES => [
606 606
         P_MISSION_EXPEDITION_OUTCOME           => FLT_EXPEDITION_OUTCOME_FOUND_RESOURCES,
607 607
         P_MISSION_EXPEDITION_OUTCOME_TYPE      => FLT_EXPEDITION_OUTCOME_TYPE_GOOD,
608 608
         P_CHANCE                               => 300,
609
-        'percent'                              => [0 => 0.1, 1 => 0.050, 2 => 0.025,],
609
+        'percent'                              => [0 => 0.1, 1 => 0.050, 2 => 0.025, ],
610 610
         P_MISSION_EXPEDITION_OUTCOME_SECONDARY => [
611
-          [P_CHANCE => 90, P_MULTIPLIER => 0.025, P_MESSAGE_ID => 2,],
612
-          [P_CHANCE => 9, P_MULTIPLIER => 0.050, P_MESSAGE_ID => 1,],
613
-          [P_CHANCE => 1, P_MULTIPLIER => 0.100, P_MESSAGE_ID => 0,],
611
+          [P_CHANCE => 90, P_MULTIPLIER => 0.025, P_MESSAGE_ID => 2, ],
612
+          [P_CHANCE => 9, P_MULTIPLIER => 0.050, P_MESSAGE_ID => 1, ],
613
+          [P_CHANCE => 1, P_MULTIPLIER => 0.100, P_MESSAGE_ID => 0, ],
614 614
         ],
615 615
       ],
616 616
       FLT_EXPEDITION_OUTCOME_FOUND_DM        => [
617 617
         P_MISSION_EXPEDITION_OUTCOME           => FLT_EXPEDITION_OUTCOME_FOUND_DM,
618 618
         P_MISSION_EXPEDITION_OUTCOME_TYPE      => FLT_EXPEDITION_OUTCOME_TYPE_GOOD,
619 619
         P_CHANCE                               => 100,
620
-        'percent'                              => [0 => 0.0100, 1 => 0.0040, 2 => 0.0010,],
620
+        'percent'                              => [0 => 0.0100, 1 => 0.0040, 2 => 0.0010, ],
621 621
         P_MISSION_EXPEDITION_OUTCOME_SECONDARY => [
622 622
           [P_CHANCE => 90, P_MULTIPLIER => 0.0010, /*P_MESSAGE_ID => 2,*/],
623 623
           [P_CHANCE => 9, P_MULTIPLIER => 0.0040, /*P_MESSAGE_ID => 1,*/],
@@ -652,14 +652,14 @@  discard block
 block discarded – undo
652 652
     ],
653 653
 
654 654
     'planet_generator' => [
655
-      0  => [ // HomeWorld
655
+      0  => [// HomeWorld
656 656
         't_max_min'     => 40, // Tmax 40
657 657
         't_max_max'     => 40,
658 658
         't_delta_min'   => 40, // Tmin 0
659 659
         't_delta_max'   => 40,
660 660
         'size_min'      => $config->initial_fields,
661 661
         'size_max'      => $config->initial_fields,
662
-        'core_types'    => [PLANET_DENSITY_STANDARD,],
662
+        'core_types'    => [PLANET_DENSITY_STANDARD, ],
663 663
         'planet_images' => ['normaltemp'],
664 664
       ],
665 665
       1  => [
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
         ],
890 890
         'planet_images' => ['eis'],
891 891
       ],
892
-      16 => [ // Random planet - stranger; -35 avg
892
+      16 => [// Random planet - stranger; -35 avg
893 893
         't_max_min'     => -90,
894 894
         't_max_max'     => +40,
895 895
         't_delta_min'   => 2,
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
           PLANET_DENSITY_METAL_PERIDOT,
910 910
           PLANET_DENSITY_METAL_RAW,
911 911
         ],
912
-        'planet_images' => ['trocken', 'dschjungel', 'normaltemp', 'wasser', 'eis',],
912
+        'planet_images' => ['trocken', 'dschjungel', 'normaltemp', 'wasser', 'eis', ],
913 913
       ],
914 914
     ],
915 915
 
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_ICE_HYDROGEN,
933 933
         UNIT_PLANET_DENSITY_RARITY        => 30, // 1, // 40.00, // * 1/121 0,82645
934 934
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_PERFECT,
935
-        UNIT_RESOURCES                    => [RES_METAL => 0.20, RES_CRYSTAL => 0.60, RES_DEUTERIUM => 7.10,],
935
+        UNIT_RESOURCES                    => [RES_METAL => 0.20, RES_CRYSTAL => 0.60, RES_DEUTERIUM => 7.10, ],
936 936
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 150,
937 937
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11,
938 938
       ],
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_ICE_METHANE,
942 942
         UNIT_PLANET_DENSITY_RARITY        => 130, // 6, // 6.67, // * 6,0	4,95868
943 943
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_GOOD,
944
-        UNIT_RESOURCES                    => [RES_METAL => 0.55, RES_CRYSTAL => 0.85, RES_DEUTERIUM => 4.60,],
944
+        UNIT_RESOURCES                    => [RES_METAL => 0.55, RES_CRYSTAL => 0.85, RES_DEUTERIUM => 4.60, ],
945 945
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 200,
946 946
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6,
947 947
       ],
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_ICE_WATER,
951 951
         UNIT_PLANET_DENSITY_RARITY        => 450, //20, // 2.00, // * 20,0	16,52893
952 952
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_AVERAGE,
953
-        UNIT_RESOURCES                    => [RES_METAL => 0.86, RES_CRYSTAL => 0.95, RES_DEUTERIUM => 2.20,],
953
+        UNIT_RESOURCES                    => [RES_METAL => 0.86, RES_CRYSTAL => 0.95, RES_DEUTERIUM => 2.20, ],
954 954
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 999,
955 955
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0,
956 956
       ],
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_CRYSTAL_RAW,
961 961
         UNIT_PLANET_DENSITY_RARITY        => 20, // 1, // 40.00, // *1,0	0,82645
962 962
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_PERFECT,
963
-        UNIT_RESOURCES                    => [RES_METAL => 0.40, RES_CRYSTAL => 12.37, RES_DEUTERIUM => 0.50,],
963
+        UNIT_RESOURCES                    => [RES_METAL => 0.40, RES_CRYSTAL => 12.37, RES_DEUTERIUM => 0.50, ],
964 964
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 150,
965 965
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11,
966 966
       ],
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_CRYSTAL_SILICATE,
970 970
         UNIT_PLANET_DENSITY_RARITY        => 140, // 5.71, // * 7,0	5,78512
971 971
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_GOOD,
972
-        UNIT_RESOURCES                    => [RES_METAL => 0.67, RES_CRYSTAL => 4.50, RES_DEUTERIUM => 0.85,],
972
+        UNIT_RESOURCES                    => [RES_METAL => 0.67, RES_CRYSTAL => 4.50, RES_DEUTERIUM => 0.85, ],
973 973
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 200,
974 974
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6,
975 975
       ],
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_CRYSTAL_STONE,
979 979
         UNIT_PLANET_DENSITY_RARITY        => 500, // 1.90, // * 21,0	17,35537
980 980
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_AVERAGE,
981
-        UNIT_RESOURCES                    => [RES_METAL => 0.80, RES_CRYSTAL => 2.00, RES_DEUTERIUM => 0.95,],
981
+        UNIT_RESOURCES                    => [RES_METAL => 0.80, RES_CRYSTAL => 2.00, RES_DEUTERIUM => 0.95, ],
982 982
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 999,
983 983
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0,
984 984
       ],
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_STANDARD,
989 989
         UNIT_PLANET_DENSITY_RARITY        => 1000, // 1.0, // * 40,0	33,05785
990 990
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_NORMAL,
991
-        UNIT_RESOURCES                    => [RES_METAL => 1.00, RES_CRYSTAL => 1.00, RES_DEUTERIUM => 1.00,],
991
+        UNIT_RESOURCES                    => [RES_METAL => 1.00, RES_CRYSTAL => 1.00, RES_DEUTERIUM => 1.00, ],
992 992
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 999,
993 993
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0,
994 994
       ],
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_METAL_ORE,
999 999
         UNIT_PLANET_DENSITY_RARITY        => 550, // 2.11, // * 19,0	15,70248
1000 1000
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_AVERAGE,
1001
-        UNIT_RESOURCES                    => [RES_METAL => 1.60, RES_CRYSTAL => 0.90, RES_DEUTERIUM => 0.80,],
1001
+        UNIT_RESOURCES                    => [RES_METAL => 1.60, RES_CRYSTAL => 0.90, RES_DEUTERIUM => 0.80, ],
1002 1002
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 999,
1003 1003
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0,
1004 1004
       ],
@@ -1007,7 +1007,7 @@  discard block
 block discarded – undo
1007 1007
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_METAL_PERIDOT,
1008 1008
         UNIT_PLANET_DENSITY_RARITY        => 120, // 8.00, // * 5,0	4,13223
1009 1009
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_GOOD,
1010
-        UNIT_RESOURCES                    => [RES_METAL => 4.71, RES_CRYSTAL => 0.80, RES_DEUTERIUM => 0.55,],
1010
+        UNIT_RESOURCES                    => [RES_METAL => 4.71, RES_CRYSTAL => 0.80, RES_DEUTERIUM => 0.55, ],
1011 1011
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 200,
1012 1012
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6,
1013 1013
       ],
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
         UNIT_PLANET_DENSITY_INDEX         => PLANET_DENSITY_METAL_RAW,
1017 1017
         UNIT_PLANET_DENSITY_RARITY        => 25, // 40.00, // * 1,0	0,82645
1018 1018
         UNIT_PLANET_DENSITY_RICHNESS      => PLANET_DENSITY_RICHNESS_PERFECT,
1019
-        UNIT_RESOURCES                    => [RES_METAL => 8.00, RES_CRYSTAL => 0.40, RES_DEUTERIUM => 0.25,],
1019
+        UNIT_RESOURCES                    => [RES_METAL => 8.00, RES_CRYSTAL => 0.40, RES_DEUTERIUM => 0.25, ],
1020 1020
         UNIT_PLANET_DENSITY_MAX_SECTORS   => 150,
1021 1021
         UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11,
1022 1022
       ],
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
     ],
1194 1194
 
1195 1195
     // Missiles list
1196
-    'missile'            => [UNIT_DEF_MISSILE_INTERCEPTOR => UNIT_DEF_MISSILE_INTERCEPTOR, UNIT_DEF_MISSILE_INTERPLANET => UNIT_DEF_MISSILE_INTERPLANET,],
1196
+    'missile'            => [UNIT_DEF_MISSILE_INTERCEPTOR => UNIT_DEF_MISSILE_INTERCEPTOR, UNIT_DEF_MISSILE_INTERPLANET => UNIT_DEF_MISSILE_INTERPLANET, ],
1197 1197
 
1198 1198
     // Combat units list
1199 1199
     'combat'             => [
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
     // Resource list
1243 1243
     'resources'          => [0 => 'metal', 1 => 'crystal', 2 => 'deuterium', 3 => 'dark_matter'],
1244 1244
     // Resources all
1245
-    'resources_all'      => [RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY, RES_DARK_MATTER => RES_DARK_MATTER, RES_METAMATTER => RES_METAMATTER,],
1245
+    'resources_all'      => [RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY, RES_DARK_MATTER => RES_DARK_MATTER, RES_METAMATTER => RES_METAMATTER, ],
1246 1246
     // Resources can be produced on planet
1247 1247
     'resources_planet'   => [RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY],
1248 1248
     // Resources can be looted from planet
@@ -1261,13 +1261,13 @@  discard block
 block discarded – undo
1261 1261
     ],
1262 1262
 
1263 1263
     // Resources that can be tradeable in market trader AND be a quest_rewards
1264
-    'quest_rewards'      => [RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_DARK_MATTER => RES_DARK_MATTER,],
1264
+    'quest_rewards'      => [RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_DARK_MATTER => RES_DARK_MATTER, ],
1265 1265
 
1266 1266
 //      // Ques list
1267 1267
 //      'ques' => array(QUE_STRUCTURES, QUE_HANGAR, QUE_RESEARCH),
1268 1268
 
1269
-    'STAT_COMMON' => [STAT_TOTAL => STAT_TOTAL, STAT_FLEET => STAT_FLEET, STAT_TECH => STAT_TECH, STAT_BUILDING => STAT_BUILDING, STAT_DEFENSE => STAT_DEFENSE, STAT_RESOURCE => STAT_RESOURCE,],
1270
-    'STAT_PLAYER' => [STAT_RAID_TOTAL => STAT_RAID_TOTAL, STAT_RAID_WON => STAT_RAID_WON, STAT_RAID_LOST => STAT_RAID_LOST, STAT_LVL_BUILDING => STAT_LVL_BUILDING, STAT_LVL_TECH => STAT_LVL_TECH, STAT_LVL_RAID => STAT_LVL_RAID,],
1269
+    'STAT_COMMON' => [STAT_TOTAL => STAT_TOTAL, STAT_FLEET => STAT_FLEET, STAT_TECH => STAT_TECH, STAT_BUILDING => STAT_BUILDING, STAT_DEFENSE => STAT_DEFENSE, STAT_RESOURCE => STAT_RESOURCE, ],
1270
+    'STAT_PLAYER' => [STAT_RAID_TOTAL => STAT_RAID_TOTAL, STAT_RAID_WON => STAT_RAID_WON, STAT_RAID_LOST => STAT_RAID_LOST, STAT_LVL_BUILDING => STAT_LVL_BUILDING, STAT_LVL_TECH => STAT_LVL_TECH, STAT_LVL_RAID => STAT_LVL_RAID, ],
1271 1271
 
1272 1272
     GROUP_GROUP_ID_TO_NAMES => [
1273 1273
       UNIT_STRUCTURES   => 'structures',
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
       UNIT_PLANS        => 'plans',
1282 1282
     ],
1283 1283
 
1284
-    GROUP_CAPITAL_BUILDING_BONUS_GROUPS => ['structures', 'defense', 'fleet',],
1284
+    GROUP_CAPITAL_BUILDING_BONUS_GROUPS => ['structures', 'defense', 'fleet', ],
1285 1285
 
1286 1286
     GROUP_UNIT_COMBAT_SORT_ORDER => [
1287 1287
       SHIP_SPY,
Please login to merge, or discard this patch.
resources.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 // $BuildEnergyTech             = $user['energy_tech'];
113 113
 for ($Option = 10; $Option >= 0; $Option--)
114 114
 {
115
- $template->assign_block_vars('option', array(
116
-   'VALUE' => $Option * 10,
117
- ));
115
+  $template->assign_block_vars('option', array(
116
+    'VALUE' => $Option * 10,
117
+  ));
118 118
 }
119 119
 
120 120
 $capsObj = new ResourceCalculations();
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
 int_calc_storage_bar(RES_DEUTERIUM, $capsObj);
181 181
 
182 182
 $template->assign_vars(array(
183
- 'PLANET_NAME'          => $planetrow['name'],
184
- 'PLANET_TYPE'          => $planetrow['planet_type'],
183
+  'PLANET_NAME'          => $planetrow['name'],
184
+  'PLANET_TYPE'          => $planetrow['planet_type'],
185 185
 
186
- 'PRODUCTION_LEVEL'     => floor($capsObj->efficiency * 100),
186
+  'PRODUCTION_LEVEL'     => floor($capsObj->efficiency * 100),
187 187
 
188
- 'PAGE_HINT'            => $lang['res_hint'],
188
+  'PAGE_HINT'            => $lang['res_hint'],
189 189
 ));
190 190
 
191 191
 display($template, $lang['res_planet_production']);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
   ]);
53 53
 };
54 54
 
55
-$ValidList['percent'] = array (  0,  10,  20,  30,  40,  50,  60,  70,  80,  90, 100 );
55
+$ValidList['percent'] = array(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100);
56 56
 $template = gettemplate('resources', true);
57 57
 
58 58
 /** @noinspection PhpUnhandledExceptionInspection */
59 59
 $planet = SN::$gc->repoV2->getPlanet($planetrow['id']);
60
-if(!empty($transmutation_result = $planet->sn_sys_planet_core_transmute($user))) {
60
+if (!empty($transmutation_result = $planet->sn_sys_planet_core_transmute($user))) {
61 61
   $template->assign_block_vars('result', $transmutation_result);
62 62
   $planet->dbLoadRecord($planetrow['id']);
63 63
 }
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
   'ENERGY_TYPE'    => $capsObj->productionCurrentMatrix[RES_ENERGY][0],
130 130
 ));
131 131
 
132
-foreach($sn_group_factories as $unit_id)
132
+foreach ($sn_group_factories as $unit_id)
133 133
 {
134
-  if(mrc_get_level($user, $planetrow, $unit_id) > 0 && get_unit_param($unit_id))
134
+  if (mrc_get_level($user, $planetrow, $unit_id) > 0 && get_unit_param($unit_id))
135 135
   {
136 136
     $level_plain = mrc_get_level($user, $planetrow, $unit_id, false, true);
137 137
     $template->assign_block_vars('production', array(
Please login to merge, or discard this patch.