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.