Passed
Push — work-fleets ( 4e1f0c...91349a )
by SuperNova.WS
10:40
created
classes/Common/ContainerPlus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
    * @return bool
39 39
    */
40 40
   public function isEmpty() {
41
-    throw new \Exception(get_class() . '::isEmpty() not implemented - inherited from ContainerPlus');
41
+    throw new \Exception(get_class().'::isEmpty() not implemented - inherited from ContainerPlus');
42 42
   }
43 43
 
44 44
   /**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
    * @return mixed
48 48
    */
49 49
   public function clear() {
50
-    throw new \Exception(get_class() . '::clear() not implemented - inherited from ContainerPlus');
50
+    throw new \Exception(get_class().'::clear() not implemented - inherited from ContainerPlus');
51 51
   }
52 52
 
53 53
 }
Please login to merge, or discard this patch.
classes/Common/Types.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
    */
13 13
   public function castAs($type, $value) {
14 14
     // TODO: Here should be some conversions to property type
15
-    switch($type) {
15
+    switch ($type) {
16 16
       case TYPE_INTEGER:
17 17
         $value = intval($value);
18 18
       break;
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
       break;
31 31
 
32 32
       case TYPE_ARRAY:
33
-        $value = (array)$value;
33
+        $value = (array) $value;
34 34
       break;
35 35
 
36 36
       case TYPE_STRING:
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
       case TYPE_EMPTY:
39 39
         // No-type defaults to string
40 40
       default:
41
-        $value = (string)$value;
41
+        $value = (string) $value;
42 42
       break;
43 43
     }
44 44
 
Please login to merge, or discard this patch.
classes/DBRow.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
    * @param db_mysql|null $db
87 87
    */
88 88
   public static function setDb($db = null) {
89
-    if(empty($db) || !($db instanceof db_mysql)) {
89
+    if (empty($db) || !($db instanceof db_mysql)) {
90 90
       $db = null;
91 91
     }
92 92
     static::$db = !empty($db) || !class_exists('classSupernova', false) ? $db : classSupernova::$db;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
   public function dbLoad($dbId, $lockSkip = false) {
150 150
     $dbId = idval($dbId);
151 151
     if ($dbId <= 0) {
152
-      classSupernova::$debug->error(get_called_class() . '::' . __METHOD__ . ' $dbId not positive = ' . $dbId);
152
+      classSupernova::$debug->error(get_called_class().'::'.__METHOD__.' $dbId not positive = '.$dbId);
153 153
 
154 154
       return;
155 155
     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
       $this->dbGetLockById($this->_dbId);
162 162
     }
163 163
 
164
-    $db_row = classSupernova::$db->doSelectFetch("SELECT * FROM `{{" . static::$_table . "}}` WHERE `" . static::$_dbIdFieldName . "` = " . $this->_dbId . " LIMIT 1 FOR UPDATE;");
164
+    $db_row = classSupernova::$db->doSelectFetch("SELECT * FROM `{{".static::$_table."}}` WHERE `".static::$_dbIdFieldName."` = ".$this->_dbId." LIMIT 1 FOR UPDATE;");
165 165
     if (empty($db_row)) {
166 166
       return;
167 167
     }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     if ($this->isNew()) {
194 194
       // No DB_ID - new unit
195 195
       if ($this->isEmpty()) {
196
-        classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - object is empty on ' . get_called_class() . '::dbSave');
196
+        classSupernova::$debug->error(__FILE__.':'.__LINE__.' - object is empty on '.get_called_class().'::dbSave');
197 197
       }
198 198
       $this->dbInsert();
199 199
     } else {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $this->dbDelete();
203 203
       } else {
204 204
         if (!sn_db_transaction_check(false)) {
205
-          classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - transaction should always be started on ' . get_called_class() . '::dbUpdate');
205
+          classSupernova::$debug->error(__FILE__.':'.__LINE__.' - transaction should always be started on '.get_called_class().'::dbUpdate');
206 206
         }
207 207
         $this->dbUpdate();
208 208
       }
@@ -230,13 +230,13 @@  discard block
 block discarded – undo
230 230
   // TODO - protected
231 231
   public function dbInsert() {
232 232
     if (!$this->isNew()) {
233
-      classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - record db_id is not empty on ' . get_called_class() . '::dbInsert');
233
+      classSupernova::$debug->error(__FILE__.':'.__LINE__.' - record db_id is not empty on '.get_called_class().'::dbInsert');
234 234
     }
235 235
 
236 236
     $fieldSet = $this->dbMakeFieldSet(false);
237 237
 
238 238
     if (!static::$db->doInsertSet(static::$_table, $fieldSet)) {
239
-      classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - error saving record ' . get_called_class() . '::dbInsert');
239
+      classSupernova::$debug->error(__FILE__.':'.__LINE__.' - error saving record '.get_called_class().'::dbInsert');
240 240
     }
241 241
     $this->_dbId = static::$db->db_insert_id();
242 242
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
   public function dbUpdate() {
251 251
     // TODO - Update
252 252
     if ($this->isNew()) {
253
-      classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - unit db_id is empty on dbUpdate');
253
+      classSupernova::$debug->error(__FILE__.':'.__LINE__.' - unit db_id is empty on dbUpdate');
254 254
     }
255 255
     $this->db_field_update($this->dbMakeFieldUpdate());
256 256
   }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
   // TODO - protected
262 262
   public function dbDelete() {
263 263
     if ($this->isNew()) {
264
-      classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - unit db_id is empty on dbDelete');
264
+      classSupernova::$debug->error(__FILE__.':'.__LINE__.' - unit db_id is empty on dbDelete');
265 265
     }
266 266
     classSupernova::$gc->db->doDeleteRowWhere(static::$_table, array(static::$_dbIdFieldName => $this->_dbId));
267 267
     $this->_dbId = 0;
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
       }
448 448
     }
449 449
 
450
-    if(empty($set)) {
450
+    if (empty($set)) {
451 451
       $theResult = true;
452 452
     } else {
453 453
       $theResult = classSupernova::$db->doUpdateRowAdjust(
Please login to merge, or discard this patch.
classes/Mission/MissionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
    * @throws ExceptionFleetInvalid
35 35
    */
36 36
   public static function build($missionType, $fleet) {
37
-    if (!empty(self::$missions[$missionType]) && class_exists($className = __NAMESPACE__ . '\\' . self::$missions[$missionType])) {
37
+    if (!empty(self::$missions[$missionType]) && class_exists($className = __NAMESPACE__.'\\'.self::$missions[$missionType])) {
38 38
       $result = new $className($fleet);
39 39
     } else {
40 40
       throw new ExceptionFleetInvalid("Mission type {$missionType} unknown", FLIGHT_MISSION_UNKNOWN);
Please login to merge, or discard this patch.
classes/Buddy/BuddyModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  *
21 21
  * @package Buddy
22 22
  */
23
-class BuddyModel extends \Entity\KeyedModel{
23
+class BuddyModel extends \Entity\KeyedModel {
24 24
 
25 25
   /**
26 26
    * Name of table for this entity
Please login to merge, or discard this patch.
classes/Buddy/BuddyParams.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @property string           $playerName
22 22
  * @property string           $playerNameAndCoordinates
23 23
  */
24
-class BuddyParams extends ContainerPlus  {
24
+class BuddyParams extends ContainerPlus {
25 25
 
26 26
   /**
27 27
    * BuddyParams constructor.
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 
40 40
 //    $this->playerArray = $user;
41 41
 
42
-    $this->playerId = function (BuddyParams $cBuddy) {
42
+    $this->playerId = function(BuddyParams $cBuddy) {
43 43
       return $cBuddy->playerArray['id'];
44 44
     };
45
-    $this->playerName = function (BuddyParams $cBuddy) {
45
+    $this->playerName = function(BuddyParams $cBuddy) {
46 46
       return $cBuddy->playerArray['username'];
47 47
     };
48
-    $this->playerNameAndCoordinates = function (BuddyParams $cBuddy) {
49
-      return "{$cBuddy->playerArray['username']} " . uni_render_coordinates($cBuddy->playerArray);
48
+    $this->playerNameAndCoordinates = function(BuddyParams $cBuddy) {
49
+      return "{$cBuddy->playerArray['username']} ".uni_render_coordinates($cBuddy->playerArray);
50 50
     };
51 51
   }
52 52
 
Please login to merge, or discard this patch.
classes/db_mysql_v4.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     !mysql_select_db($settings['name'])
53 53
       ? classSupernova::$debug->error_fatal('DB error - cannot find DB on server', $this->mysql_error())
54 54
       : false;
55
-    !$this->mysql_query('SET SESSION TRANSACTION ISOLATION LEVEL ' . self::DB_MYSQL_TRANSACTION_REPEATABLE_READ . ';')
55
+    !$this->mysql_query('SET SESSION TRANSACTION ISOLATION LEVEL '.self::DB_MYSQL_TRANSACTION_REPEATABLE_READ.';')
56 56
       ? classSupernova::$debug->error_fatal('DB error - cannot set desired isolation level', $this->mysql_error())
57 57
       : false;
58 58
 
Please login to merge, or discard this patch.
classes/DbResultIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
    * @since 5.1.0
126 126
    */
127 127
   public function count() {
128
-    throw new Exception('You should implement ' . get_called_class() . '::count()');
128
+    throw new Exception('You should implement '.get_called_class().'::count()');
129 129
   }
130 130
 
131 131
 }
Please login to merge, or discard this patch.
classes/PropertyHiderInObject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 class PropertyHiderInObject extends PropertyHider {
4 4
   private function getPhysicalPropertyName($name) {
5
-    return '_' . $name;
5
+    return '_'.$name;
6 6
   }
7 7
 
8 8
   /**
Please login to merge, or discard this patch.