@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | protected function __construct() |
40 | 40 | { |
41 | - static::$instance =& $this; |
|
41 | + static::$instance = & $this; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | // ------------------------------------------------------------------------ |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function store($offset, $data) |
72 | 72 | { |
73 | - $this->storage[ $offset ] = $data; |
|
73 | + $this->storage[$offset] = $data; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | // ------------------------------------------------------------------------ |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | public function get($offset) |
126 | 126 | { |
127 | 127 | if ($this->__isset($offset)) { |
128 | - return $this->storage[ $offset ]; |
|
128 | + return $this->storage[$offset]; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function exists($offset) |
163 | 163 | { |
164 | - return (bool)isset($this->storage[ $offset ]); |
|
164 | + return (bool)isset($this->storage[$offset]); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | // ------------------------------------------------------------------------ |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | public function remove($offset) |
237 | 237 | { |
238 | 238 | if ($this->__isset($offset)) { |
239 | - unset($this->storage[ $offset ]); |
|
239 | + unset($this->storage[$offset]); |
|
240 | 240 | } |
241 | 241 | } |
242 | 242 | |
@@ -330,9 +330,9 @@ discard block |
||
330 | 330 | public function search($offset, $return = false) |
331 | 331 | { |
332 | 332 | if (array_key_exists($offset, $this->storage)) { |
333 | - return $this->storage[ $offset ]; |
|
333 | + return $this->storage[$offset]; |
|
334 | 334 | } elseif (false !== ($offsetKey = array_search($offset, $this->storage))) { |
335 | - return $this->storage[ $offsetKey ]; |
|
335 | + return $this->storage[$offsetKey]; |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | return $return; |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function &getObject($offset) |
91 | 91 | { |
92 | - $get[ $offset ] = null; |
|
92 | + $get[$offset] = null; |
|
93 | 93 | |
94 | 94 | if ($this->__isset($offset)) { |
95 | - return $this->registry[ $offset ]; |
|
95 | + return $this->registry[$offset]; |
|
96 | 96 | } |
97 | 97 | |
98 | - return $get[ $offset ]; |
|
98 | + return $get[$offset]; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | // ------------------------------------------------------------------------ |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | public function exists($offset) |
130 | 130 | { |
131 | - return (bool)isset($this->registry[ $offset ]); |
|
131 | + return (bool)isset($this->registry[$offset]); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | // ------------------------------------------------------------------------ |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | if ( ! $this->__isset($offset)) { |
162 | - $this->registry[ $offset ] = $object; |
|
162 | + $this->registry[$offset] = $object; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | } |
@@ -195,11 +195,11 @@ discard block |
||
195 | 195 | public function remove($offset) |
196 | 196 | { |
197 | 197 | if ($this->__isset($offset)) { |
198 | - if (method_exists($this->registry[ $offset ], '__destruct')) { |
|
199 | - $this->registry[ $offset ]->__destruct(); |
|
198 | + if (method_exists($this->registry[$offset], '__destruct')) { |
|
199 | + $this->registry[$offset]->__destruct(); |
|
200 | 200 | } |
201 | 201 | |
202 | - unset($this->registry[ $offset ]); |
|
202 | + unset($this->registry[$offset]); |
|
203 | 203 | } |
204 | 204 | } |
205 | 205 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | if (method_exists($object, '__destruct')) { |
219 | 219 | $object->__destruct(); |
220 | 220 | } |
221 | - unset($this->registry[ $offset ]); |
|
221 | + unset($this->registry[$offset]); |
|
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | final public function getObjectHash($offset) |
237 | 237 | { |
238 | 238 | if ($this->__isset($offset)) { |
239 | - return spl_object_hash($this->registry[ $offset ]); |
|
239 | + return spl_object_hash($this->registry[$offset]); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | return false; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | final public function getObjectId($offset) |
257 | 257 | { |
258 | 258 | if ($this->__isset($offset)) { |
259 | - return spl_object_id($this->registry[ $offset ]); |
|
259 | + return spl_object_id($this->registry[$offset]); |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | return false; |
@@ -136,10 +136,10 @@ |
||
136 | 136 | */ |
137 | 137 | public function addError($code, $message) |
138 | 138 | { |
139 | - if(class_exists('\O2System\Kernel')) { |
|
140 | - $this->errors[ $code ] = language($message); |
|
139 | + if (class_exists('\O2System\Kernel')) { |
|
140 | + $this->errors[$code] = language($message); |
|
141 | 141 | } else { |
142 | - $this->errors[ $code ] = $message; |
|
142 | + $this->errors[$code] = $message; |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | } |
146 | 146 | \ No newline at end of file |