Completed
Push — work-fleets ( d6880d...ad253d )
by SuperNova.WS
07:04
created
classes/V2Fleet/V2FleetModel.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 
8 8
 use Common\V2Location;
9 9
 use DBStatic\DBStaticFleetACS;
10
-use V2Unit\V2UnitList;
11 10
 use Vector\Vector;
12 11
 use Entity\KeyedModel;
13 12
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
       'isReturning' => array(),
79 79
     ));
80 80
 
81
-    $this->accessors->setAccessor('location', P_CONTAINER_GET, function (V2FleetContainer $that) {
81
+    $this->accessors->setAccessor('location', P_CONTAINER_GET, function(V2FleetContainer $that) {
82 82
       if (is_null($location = $that->getDirect('location'))) {
83 83
         $location = new V2Location(LOC_FLEET);
84 84
         $that->setDirect('location', $location);
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
       return $location;
88 88
     });
89 89
 
90
-    $this->accessors->setAccessor('dbId', P_CONTAINER_SET, function (V2FleetContainer $that, $value) {
90
+    $this->accessors->setAccessor('dbId', P_CONTAINER_SET, function(V2FleetContainer $that, $value) {
91 91
       $that->setDirect('dbId', $value);
92 92
       $that->location->setLocationId($value);
93 93
     });
94 94
 
95
-    $this->accessors->setAccessor('ownerId', P_CONTAINER_SET, function (V2FleetContainer $that, $value) {
95
+    $this->accessors->setAccessor('ownerId', P_CONTAINER_SET, function(V2FleetContainer $that, $value) {
96 96
       $that->setDirect('ownerId', $value);
97 97
       $that->location->setLocationPlayerId($value);
98 98
     });
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     $this->accessors->setAccessor('vectorArrive', P_CONTAINER_EXPORT, array($this, 'exportVector'));
104 104
 
105 105
 
106
-    $this->accessors->setAccessor('units', P_CONTAINER_GET, function (V2FleetContainer $that) {
106
+    $this->accessors->setAccessor('units', P_CONTAINER_GET, function(V2FleetContainer $that) {
107 107
       if (is_null($units = $that->getDirect('units'))) {
108 108
         $units = \classSupernova::$gc->unitList;
109 109
         $that->setDirect('units', $units);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
       return $units;
113 113
     });
114 114
 
115
-    $this->accessors->setAccessor('isReturning', P_CONTAINER_GET, function (V2FleetContainer $that) {
115
+    $this->accessors->setAccessor('isReturning', P_CONTAINER_GET, function(V2FleetContainer $that) {
116 116
       return $that->status == FLEET_FLAG_RETURNING;
117 117
     });
118 118
 
Please login to merge, or discard this patch.
classes/Common/IndexedObjectStorage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
    * @throws \Exception
72 72
    */
73 73
   protected function indexDuplicated($object, $data) {
74
-    throw new \Exception('Duplicate index [' . $data . '] in ' . __CLASS__);
74
+    throw new \Exception('Duplicate index ['.$data.'] in '.__CLASS__);
75 75
   }
76 76
 
77 77
   /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     if ($this->contains($object)) {
120 120
       $this->indexUnset($object);
121 121
     }
122
-    if($this->indexSet($object, $data)) {
122
+    if ($this->indexSet($object, $data)) {
123 123
       // Attaches object only if index sets successfully
124 124
       parent::attach($object, $data);
125 125
     }
Please login to merge, or discard this patch.
classes/Common/GlobalContainer.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -43,62 +43,62 @@
 block discarded – undo
43 43
     $gc = $this;
44 44
 
45 45
     // Default db
46
-    $gc->db = function ($c) {
46
+    $gc->db = function($c) {
47 47
       classSupernova::$db = $db = new \db_mysql($c);
48 48
 
49 49
       return $db;
50 50
     };
51 51
 
52
-    $gc->debug = function ($c) {
52
+    $gc->debug = function($c) {
53 53
       return new \debug();
54 54
     };
55 55
 
56
-    $gc->types = function ($c) {
56
+    $gc->types = function($c) {
57 57
       return new \Common\Types();
58 58
     };
59 59
 
60
-    $gc->cache = function ($c) {
60
+    $gc->cache = function($c) {
61 61
       return new \classCache(classSupernova::$cache_prefix);
62 62
     };
63 63
 
64
-    $gc->config = function ($c) {
64
+    $gc->config = function($c) {
65 65
       return new \classConfig(classSupernova::$cache_prefix);
66 66
     };
67 67
 
68
-    $gc->localePlayer = function (GlobalContainer $c) {
68
+    $gc->localePlayer = function(GlobalContainer $c) {
69 69
       return new \classLocale($c->config->server_locale_log_usage);
70 70
     };
71 71
 
72
-    $gc->dbGlobalRowOperator = function (GlobalContainer $c) {
72
+    $gc->dbGlobalRowOperator = function(GlobalContainer $c) {
73 73
       return new \DbRowDirectOperator($c->db);
74 74
     };
75 75
 
76
-    $gc->query = $gc->factory(function (GlobalContainer $c) {
76
+    $gc->query = $gc->factory(function(GlobalContainer $c) {
77 77
       return new \DbQueryConstructor($c->db);
78 78
     });
79 79
 
80
-    $gc->cacheOperator = function (GlobalContainer $gc) {
80
+    $gc->cacheOperator = function(GlobalContainer $gc) {
81 81
       return new \SnDbCachedOperator($gc);
82 82
     };
83 83
 
84 84
     $gc->snCacheClass = 'SnCache';
85
-    $gc->snCache = function (GlobalContainer $gc) {
85
+    $gc->snCache = function(GlobalContainer $gc) {
86 86
       return $gc->db->snCache;
87 87
     };
88 88
 
89 89
     $gc->buddyClass = 'Buddy\BuddyModel';
90
-    $gc->buddyModel = function (GlobalContainer $c) {
90
+    $gc->buddyModel = function(GlobalContainer $c) {
91 91
       return new $c->buddyClass($c);
92 92
     };
93 93
 
94
-    $gc->unitModel = function (GlobalContainer $c) {
94
+    $gc->unitModel = function(GlobalContainer $c) {
95 95
       return new \V2Unit\V2UnitModel($c);
96 96
     };
97
-    $gc->unitList = $this->factory(function (GlobalContainer $c) {
97
+    $gc->unitList = $this->factory(function(GlobalContainer $c) {
98 98
       return new \V2Unit\V2UnitList($c);
99 99
     });
100 100
 
101
-    $gc->fleetModel = function (GlobalContainer $c) {
101
+    $gc->fleetModel = function(GlobalContainer $c) {
102 102
       return new V2FleetModel($c);
103 103
     };
104 104
   }
Please login to merge, or discard this patch.
classes/Common/ObjectCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
    * @since 5.0.0
81 81
    */
82 82
   public function offsetUnset($offset) {
83
-    if($this->offsetExists($offset)) {
83
+    if ($this->offsetExists($offset)) {
84 84
       parent::offsetUnset($this->offsetGet($offset));
85 85
     }
86 86
   }
Please login to merge, or discard this patch.