Completed
Push — trunk ( 0d0bfe...e6cc80 )
by SuperNova.WS
03:47
created
includes/vars.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -564,9 +564,9 @@  discard block
 block discarded – undo
564 564
           2 => 0.01,
565 565
         ),
566 566
         P_MISSION_EXPEDITION_OUTCOME_SECONDARY => [
567
-          [P_CHANCE => 90, P_MULTIPLIER => 0.01, P_MESSAGE_ID => 2,],
568
-          [P_CHANCE =>  9, P_MULTIPLIER => 0.02, P_MESSAGE_ID => 1,],
569
-          [P_CHANCE =>  1, P_MULTIPLIER => 0.10, P_MESSAGE_ID => 0,],
567
+          [P_CHANCE => 90, P_MULTIPLIER => 0.01, P_MESSAGE_ID => 2, ],
568
+          [P_CHANCE =>  9, P_MULTIPLIER => 0.02, P_MESSAGE_ID => 1, ],
569
+          [P_CHANCE =>  1, P_MULTIPLIER => 0.10, P_MESSAGE_ID => 0, ],
570 570
         ],
571 571
       ),
572 572
       FLT_EXPEDITION_OUTCOME_FOUND_RESOURCES => array(
@@ -578,9 +578,9 @@  discard block
 block discarded – undo
578 578
           2 => 0.025,
579 579
         ),
580 580
         P_MISSION_EXPEDITION_OUTCOME_SECONDARY => [
581
-          [P_CHANCE => 90, P_MULTIPLIER => 0.025, P_MESSAGE_ID => 2,],
582
-          [P_CHANCE =>  9, P_MULTIPLIER => 0.050, P_MESSAGE_ID => 1,],
583
-          [P_CHANCE =>  1, P_MULTIPLIER => 0.100, P_MESSAGE_ID => 0,],
581
+          [P_CHANCE => 90, P_MULTIPLIER => 0.025, P_MESSAGE_ID => 2, ],
582
+          [P_CHANCE =>  9, P_MULTIPLIER => 0.050, P_MESSAGE_ID => 1, ],
583
+          [P_CHANCE =>  1, P_MULTIPLIER => 0.100, P_MESSAGE_ID => 0, ],
584 584
         ],
585 585
       ),
586 586
       FLT_EXPEDITION_OUTCOME_FOUND_DM        => array(
Please login to merge, or discard this patch.
classes/Fleet/RecordFleet.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
   public function __construct(GlobalContainer $services = null) {
77 77
     parent::__construct($services);
78 78
 
79
-    if(empty(static::$shipInfo)) {
80
-      foreach(sn_get_groups('fleet') as $unit_id) {
79
+    if (empty(static::$shipInfo)) {
80
+      foreach (sn_get_groups('fleet') as $unit_id) {
81 81
         static::$shipInfo[$unit_id] = get_unit_param($unit_id);
82 82
         static::$shipInfo[$unit_id][P_COST_METAL] = get_unit_cost_in(static::$shipInfo[$unit_id][P_COST]);
83 83
       }
@@ -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
     }
109 109
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
    */
128 128
   public function getCostInMetal() {
129 129
     $result = 0;
130
-    foreach($this->shipList as $shipId => $amount) {
130
+    foreach ($this->shipList as $shipId => $amount) {
131 131
       $result += $amount * $this->getShipCostInMetal($shipId);
132 132
     }
133 133
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
    */
149 149
   public function getCapacity() {
150 150
     $result = 0;
151
-    foreach($this->shipList as $shipId => $amount) {
151
+    foreach ($this->shipList as $shipId => $amount) {
152 152
       $result += $amount * $this->getShipCapacity($shipId);
153 153
     }
154 154
 
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
    */
166 166
   public function changeShipCount($shipSnId, $shipCount) {
167 167
     !isset($this->shipList[$shipSnId]) ? $this->shipList[$shipSnId] = 0 : false;
168
-    if($this->shipList[$shipSnId] + $shipCount < 0) {
168
+    if ($this->shipList[$shipSnId] + $shipCount < 0) {
169 169
       throw new \Exception("Trying to deduct more ships [{$shipSnId}] '{$shipCount}' then fleet has {$this->shipList[$shipSnId]}");
170 170
     }
171 171
 
172 172
     $this->shipList[$shipSnId] += $shipCount;
173
-    if($this->shipList[$shipSnId] <= 0) {
173
+    if ($this->shipList[$shipSnId] <= 0) {
174 174
       unset($this->shipList[$shipSnId]);
175 175
     }
176 176
 
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
    * @throws \Exception
186 186
    */
187 187
   public function changeResource($resourceId, $resourceCount) {
188
-    if(!array_key_exists($resourceId, $this->resources) || empty($resourceCount)) {
188
+    if (!array_key_exists($resourceId, $this->resources) || empty($resourceCount)) {
189 189
       return;
190 190
     }
191 191
 
192
-    if($this->resources[$resourceId] + $resourceCount < 0) {
192
+    if ($this->resources[$resourceId] + $resourceCount < 0) {
193 193
       throw new \Exception("Trying to deduct more resources [{$resourceId}] '{$resourceCount}' then fleet has {$this->resources[$resourceId]}");
194 194
     }
195 195
 
Please login to merge, or discard this patch.
classes/Fleet/MissionExplore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
    *
41 41
    * @var int[] $shipsToRemove
42 42
    */
43
-  protected $shipsToRemove = [SHIP_COLONIZER, SHIP_SPY,];
43
+  protected $shipsToRemove = [SHIP_COLONIZER, SHIP_SPY, ];
44 44
 
45 45
   // -------------------------------------------------------------------------------------------------------------------
46 46
   /**
Please login to merge, or discard this patch.
classes/Common/GlobalContainer.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -86,87 +86,87 @@
 block discarded – undo
86 86
 
87 87
     // Services --------------------------------------------------------------------------------------------------------
88 88
     // Default db
89
-    $gc->db = function (GlobalContainer $c) {
89
+    $gc->db = function(GlobalContainer $c) {
90 90
       classSupernova::$db = new \db_mysql($c);
91 91
 
92 92
       return classSupernova::$db;
93 93
     };
94 94
 
95
-    $gc->debug = function (/** @noinspection PhpUnusedParameterInspection */
95
+    $gc->debug = function(/** @noinspection PhpUnusedParameterInspection */
96 96
       GlobalContainer $c) {
97 97
       return new \debug();
98 98
     };
99 99
 
100
-    $gc->cache = function (GlobalContainer $gc) {
100
+    $gc->cache = function(GlobalContainer $gc) {
101 101
       return new \classCache($gc->cachePrefix);
102 102
     };
103 103
 
104
-    $gc->config = function (GlobalContainer $gc) {
104
+    $gc->config = function(GlobalContainer $gc) {
105 105
       return new \classConfig($gc->cachePrefix);
106 106
     };
107 107
 
108 108
 
109
-    $gc->repository = function (GlobalContainer $gc) {
109
+    $gc->repository = function(GlobalContainer $gc) {
110 110
       return new Repository($gc);
111 111
     };
112 112
 
113
-    $gc->storage = function (GlobalContainer $gc) {
113
+    $gc->storage = function(GlobalContainer $gc) {
114 114
       return new \Storage($gc);
115 115
     };
116 116
 
117
-    $gc->design = function (GlobalContainer $gc) {
117
+    $gc->design = function(GlobalContainer $gc) {
118 118
       return new \Design($gc);
119 119
     };
120 120
 
121
-    $gc->bbCodeParser = function (GlobalContainer $gc) {
121
+    $gc->bbCodeParser = function(GlobalContainer $gc) {
122 122
       return new \BBCodeParser($gc);
123 123
     };
124 124
 
125
-    $gc->fleetDispatcher = function (GlobalContainer $gc) {
125
+    $gc->fleetDispatcher = function(GlobalContainer $gc) {
126 126
       return new \FleetDispatcher($gc);
127 127
     };
128 128
 
129
-    $gc->watchdog = function (GlobalContainer $gc) {
129
+    $gc->watchdog = function(GlobalContainer $gc) {
130 130
       return new Watchdog($gc);
131 131
     };
132 132
 
133
-    $gc->eventBus = function (GlobalContainer $gc) {
133
+    $gc->eventBus = function(GlobalContainer $gc) {
134 134
       return new EventBus($gc);
135 135
     };
136 136
 
137
-    $gc->valueStorage = function (GlobalContainer $gc) {
137
+    $gc->valueStorage = function(GlobalContainer $gc) {
138 138
       return new ValueStorage([]);
139 139
     };
140 140
 
141
-    $gc->bonusCatalog = function (GlobalContainer $gc) {
141
+    $gc->bonusCatalog = function(GlobalContainer $gc) {
142 142
       return new BonusCatalog($gc);
143 143
     };
144 144
 
145
-    $gc->general = function (GlobalContainer $gc) {
145
+    $gc->general = function(GlobalContainer $gc) {
146 146
       return new General($gc);
147 147
     };
148 148
 
149
-    $gc->economicHelper = function (GlobalContainer $gc) {
149
+    $gc->economicHelper = function(GlobalContainer $gc) {
150 150
       return new EconomicHelper($gc);
151 151
     };
152 152
 
153
-    $gc->playerLevelHelper = function (GlobalContainer $gc) {
153
+    $gc->playerLevelHelper = function(GlobalContainer $gc) {
154 154
       return new PlayerLevelHelper($gc);
155 155
     };
156 156
 
157 157
     // Dummy objects ---------------------------------------------------------------------------------------------------
158
-    $gc->theUser = function (GlobalContainer $gc) {
158
+    $gc->theUser = function(GlobalContainer $gc) {
159 159
       return new \TheUser($gc);
160 160
     };
161 161
 
162 162
 
163 163
     // Models ----------------------------------------------------------------------------------------------------------
164 164
     $gc->skinEntityClass = \SkinV2::class;
165
-    $gc->skinModel = function (GlobalContainer $gc) {
165
+    $gc->skinModel = function(GlobalContainer $gc) {
166 166
       return new \SkinModel($gc);
167 167
     };
168 168
 
169
-    $gc->textModel = function (GlobalContainer $gc) {
169
+    $gc->textModel = function(GlobalContainer $gc) {
170 170
       return new \TextModel($gc);
171 171
     };
172 172
 
Please login to merge, or discard this patch.