@@ -85,57 +85,57 @@ |
||
85 | 85 | |
86 | 86 | $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s'); |
87 | 87 | |
88 | - if ( ! isset($sets[ 'record_status' ])) { |
|
89 | - $sets[ 'record_status' ] = $this->recordStatus; |
|
88 | + if (!isset($sets['record_status'])) { |
|
89 | + $sets['record_status'] = $this->recordStatus; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if (empty($this->primary_keys)) { |
93 | 93 | $primary_key = isset($this->primary_key) ? $this->primary_key : 'id'; |
94 | 94 | |
95 | - if (empty($sets[ $primary_key ])) { |
|
96 | - if ( ! isset($sets[ 'record_create_user' ])) { |
|
97 | - $sets[ 'record_create_user' ] = $this->recordUser; |
|
95 | + if (empty($sets[$primary_key])) { |
|
96 | + if (!isset($sets['record_create_user'])) { |
|
97 | + $sets['record_create_user'] = $this->recordUser; |
|
98 | 98 | } |
99 | 99 | |
100 | - if ( ! isset($sets[ 'record_create_timestamp' ])) { |
|
101 | - $sets[ 'record_create_timestamp' ] = $timestamp; |
|
100 | + if (!isset($sets['record_create_timestamp'])) { |
|
101 | + $sets['record_create_timestamp'] = $timestamp; |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | } else { |
105 | 105 | foreach ($this->primary_keys as $primary_key) { |
106 | - if (empty($sets[ $primary_key ])) { |
|
107 | - if ( ! isset($sets[ 'record_create_user' ])) { |
|
108 | - $sets[ 'record_create_user' ] = $this->recordUser; |
|
106 | + if (empty($sets[$primary_key])) { |
|
107 | + if (!isset($sets['record_create_user'])) { |
|
108 | + $sets['record_create_user'] = $this->recordUser; |
|
109 | 109 | } |
110 | 110 | |
111 | - if ( ! isset($sets[ 'record_create_timestamp' ])) { |
|
112 | - $sets[ 'record_create_timestamp' ] = $timestamp; |
|
111 | + if (!isset($sets['record_create_timestamp'])) { |
|
112 | + $sets['record_create_timestamp'] = $timestamp; |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | - $sets[ 'record_update_user' ] = $this->recordUser; |
|
118 | + $sets['record_update_user'] = $this->recordUser; |
|
119 | 119 | |
120 | - if ( ! isset($sets[ 'record_update_timestamp' ])) { |
|
121 | - $sets[ 'record_update_timestamp' ] = $timestamp; |
|
120 | + if (!isset($sets['record_update_timestamp'])) { |
|
121 | + $sets['record_update_timestamp'] = $timestamp; |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | |
125 | 125 | protected function updateRecordSets(array &$sets) |
126 | 126 | { |
127 | - $sets[ 'record_status' ] = $this->recordStatus; |
|
128 | - $sets[ 'record_update_user' ] = $this->recordUser; |
|
127 | + $sets['record_status'] = $this->recordStatus; |
|
128 | + $sets['record_update_user'] = $this->recordUser; |
|
129 | 129 | |
130 | 130 | $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s'); |
131 | 131 | |
132 | - if ( ! isset($sets[ 'record_update_timestamp' ])) { |
|
133 | - $sets[ 'record_update_timestamp' ] = $timestamp; |
|
132 | + if (!isset($sets['record_update_timestamp'])) { |
|
133 | + $sets['record_update_timestamp'] = $timestamp; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | if ($this->recordStatus === 'PUBLISH') { |
137 | - $sets[ 'record_delete_timestamp' ] = null; |
|
138 | - $sets[ 'record_delete_user' ] = null; |
|
137 | + $sets['record_delete_timestamp'] = null; |
|
138 | + $sets['record_delete_user'] = null; |
|
139 | 139 | } |
140 | 140 | } |
141 | 141 |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | if (method_exists($this, 'getRecordOrdering')) { |
52 | - if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) { |
|
53 | - $sets[ 'record_ordering' ] = $this->getRecordOrdering($table); |
|
52 | + if ($this->recordOrdering === true && empty($sets['record_ordering'])) { |
|
53 | + $sets['record_ordering'] = $this->getRecordOrdering($table); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | |
88 | 88 | if (empty($where)) { |
89 | 89 | if (empty($this->primaryKeys)) { |
90 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
90 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
91 | 91 | } else { |
92 | 92 | foreach ($this->primaryKeys as $primaryKey) { |
93 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
93 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | } |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | if (method_exists($this, 'getRecordOrdering')) { |
111 | - if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) { |
|
112 | - $sets[ 'record_ordering' ] = $this->getRecordOrdering($table); |
|
111 | + if ($this->recordOrdering === true && empty($sets['record_ordering'])) { |
|
112 | + $sets['record_ordering'] = $this->getRecordOrdering($table); |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | foreach ($sets as $set) { |
134 | 134 | $this->insertRecordSets($set); |
135 | 135 | |
136 | - if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) { |
|
137 | - $set[ 'record_ordering' ] = $this->getRecordOrdering($table); |
|
136 | + if ($this->recordOrdering === true && empty($sets['record_ordering'])) { |
|
137 | + $set['record_ordering'] = $this->getRecordOrdering($table); |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | } |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | |
164 | 164 | $where = []; |
165 | 165 | if (empty($this->primaryKeys)) { |
166 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
167 | - $this->qb->where($primaryKey, $sets[ $primaryKey ]); |
|
166 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
167 | + $this->qb->where($primaryKey, $sets[$primaryKey]); |
|
168 | 168 | } else { |
169 | 169 | foreach ($this->primaryKeys as $primaryKey) { |
170 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
170 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | foreach ($sets as $set) { |
180 | 180 | $this->updateRecordSets($set); |
181 | 181 | |
182 | - if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) { |
|
183 | - $set[ 'record_ordering' ] = $this->getRecordOrdering($table); |
|
182 | + if ($this->recordOrdering === true && empty($sets['record_ordering'])) { |
|
183 | + $set['record_ordering'] = $this->getRecordOrdering($table); |
|
184 | 184 | } |
185 | 185 | } |
186 | 186 | } |
@@ -219,19 +219,19 @@ discard block |
||
219 | 219 | $where = []; |
220 | 220 | |
221 | 221 | if (empty($this->primaryKeys)) { |
222 | - $where[ $primaryKey ] = $id; |
|
223 | - $sets[ $primaryKey ] = $id; |
|
222 | + $where[$primaryKey] = $id; |
|
223 | + $sets[$primaryKey] = $id; |
|
224 | 224 | } elseif (is_array($id)) { |
225 | 225 | foreach ($this->primaryKeys as $primaryKey) { |
226 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
227 | - $sets[ $primaryKey ] = $id[ $primaryKey ]; |
|
226 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
227 | + $sets[$primaryKey] = $id[$primaryKey]; |
|
228 | 228 | } |
229 | 229 | } else { |
230 | 230 | foreach ($this->primaryKeys as $primaryKey) { |
231 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
231 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
232 | 232 | } |
233 | 233 | |
234 | - $sets[ reset($this->primaryKeys) ] = $id; |
|
234 | + $sets[reset($this->primaryKeys)] = $id; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | // Reset Primary Keys |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | $affectedRows = []; |
282 | 282 | |
283 | 283 | foreach ($ids as $id) { |
284 | - $affectedRows[ $id ] = $this->trash($id); |
|
284 | + $affectedRows[$id] = $this->trash($id); |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | return $affectedRows; |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $affectedRows = []; |
295 | 295 | |
296 | 296 | foreach ($ids as $id) { |
297 | - $affectedRows[ $id ] = $this->trashBy($id, $where, $table); |
|
297 | + $affectedRows[$id] = $this->trashBy($id, $where, $table); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | return $affectedRows; |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | |
305 | 305 | public function delete($id, $force = false, $table = null) |
306 | 306 | { |
307 | - if ((isset($table) AND is_bool($table)) OR ! isset($table)) { |
|
307 | + if ((isset($table) AND is_bool($table)) OR !isset($table)) { |
|
308 | 308 | $table = $this->table; |
309 | 309 | } |
310 | 310 | |
@@ -312,13 +312,13 @@ discard block |
||
312 | 312 | |
313 | 313 | $where = []; |
314 | 314 | if (empty($this->primaryKeys)) { |
315 | - $where[ $primaryKey ] = $id; |
|
315 | + $where[$primaryKey] = $id; |
|
316 | 316 | } elseif (is_array($id)) { |
317 | 317 | foreach ($this->primaryKeys as $primaryKey) { |
318 | - $where[ $primaryKey ] = $id[ $primaryKey ]; |
|
318 | + $where[$primaryKey] = $id[$primaryKey]; |
|
319 | 319 | } |
320 | 320 | } else { |
321 | - $where[ reset($this->primaryKeys) ] = $id; |
|
321 | + $where[reset($this->primaryKeys)] = $id; |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | // Reset Primary Keys |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | $affectedRows = []; |
357 | 357 | |
358 | 358 | foreach ($ids as $id) { |
359 | - $affectedRows[ $id ] = $this->delete($id, $force, $table); |
|
359 | + $affectedRows[$id] = $this->delete($id, $force, $table); |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | return $affectedRows; |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | $affectedRows = []; |
368 | 368 | |
369 | 369 | foreach ($ids as $id) { |
370 | - $affectedRows[ $id ] = $this->deleteBy($id, $where, $force, $table); |
|
370 | + $affectedRows[$id] = $this->deleteBy($id, $where, $force, $table); |
|
371 | 371 | } |
372 | 372 | |
373 | 373 | return $affectedRows; |
@@ -384,19 +384,19 @@ discard block |
||
384 | 384 | $where = []; |
385 | 385 | |
386 | 386 | if (empty($this->primaryKeys)) { |
387 | - $where[ $primaryKey ] = $id; |
|
388 | - $sets[ $primaryKey ] = $id; |
|
387 | + $where[$primaryKey] = $id; |
|
388 | + $sets[$primaryKey] = $id; |
|
389 | 389 | } elseif (is_array($id)) { |
390 | 390 | foreach ($this->primaryKeys as $primaryKey) { |
391 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
392 | - $sets[ $primaryKey ] = $id[ $primaryKey ]; |
|
391 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
392 | + $sets[$primaryKey] = $id[$primaryKey]; |
|
393 | 393 | } |
394 | 394 | } else { |
395 | 395 | foreach ($this->primaryKeys as $primaryKey) { |
396 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
396 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
397 | 397 | } |
398 | 398 | |
399 | - $sets[ reset($this->primaryKeys) ] = $id; |
|
399 | + $sets[reset($this->primaryKeys)] = $id; |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | // Reset Primary Keys |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | $affectedRows = []; |
440 | 440 | |
441 | 441 | foreach ($ids as $id) { |
442 | - $affectedRows[ $id ] = $this->publish($id, $table); |
|
442 | + $affectedRows[$id] = $this->publish($id, $table); |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | return $affectedRows; |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | $affectedRows = []; |
453 | 453 | |
454 | 454 | foreach ($ids as $id) { |
455 | - $affectedRows[ $id ] = $this->publishBy($id, $where, $table); |
|
455 | + $affectedRows[$id] = $this->publishBy($id, $where, $table); |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | return $affectedRows; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ]); |
71 | 71 | } |
72 | 72 | |
73 | - $update[ 'id' ] = $row->id; |
|
73 | + $update['id'] = $row->id; |
|
74 | 74 | |
75 | 75 | if ($this->hasChild($row->id)) { |
76 | 76 | $right = $this->rebuild($row->id, $right, $depth + 1); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | ->update($update = [ |
81 | 81 | 'record_right' => $right, |
82 | 82 | ]); |
83 | - $update[ 'id' ] = $row->id; |
|
83 | + $update['id'] = $row->id; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | $i++; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | ->get(); |
110 | 110 | |
111 | 111 | if ($result) { |
112 | - return (bool)($result->count() == 0 ? false : true); |
|
112 | + return (bool) ($result->count() == 0 ? false : true); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | return false; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | ->get(); |
162 | 162 | |
163 | 163 | if ($result) { |
164 | - return (bool)($result->count() == 0 ? false : true); |
|
164 | + return (bool) ($result->count() == 0 ? false : true); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | return false; |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $ormResult = new \SplFixedArray($result->count()); |
45 | 45 | |
46 | 46 | foreach ($result as $key => $row) { |
47 | - $ormResult[ $key ] = new Result\Row($row, $model); |
|
47 | + $ormResult[$key] = new Result\Row($row, $model); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | parent::__construct($ormResult->toArray()); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | $this->model = new SplClassInfo($model); |
46 | 46 | |
47 | - if ( ! models()->has($this->model->getParameter())) { |
|
47 | + if (!models()->has($this->model->getParameter())) { |
|
48 | 48 | models()->register($this->model->getParameter(), $model); |
49 | 49 | } |
50 | 50 |
@@ -141,23 +141,23 @@ discard block |
||
141 | 141 | $filename = pathinfo($filePath, PATHINFO_FILENAME); |
142 | 142 | |
143 | 143 | // Get model class directory name |
144 | - $dirName = dirname($filePath) . DIRECTORY_SEPARATOR; |
|
144 | + $dirName = dirname($filePath).DIRECTORY_SEPARATOR; |
|
145 | 145 | |
146 | 146 | if ($filename === 'Model') { |
147 | - $subModelsDirName = dirname($dirName) . DIRECTORY_SEPARATOR . 'Models' . DIRECTORY_SEPARATOR; |
|
147 | + $subModelsDirName = dirname($dirName).DIRECTORY_SEPARATOR.'Models'.DIRECTORY_SEPARATOR; |
|
148 | 148 | |
149 | 149 | if (is_dir($subModelsDirName)) { |
150 | 150 | $subModelPath = $subModelsDirName; |
151 | 151 | } |
152 | - } elseif (is_dir($subModelsDirName = $dirName . $filename . DIRECTORY_SEPARATOR)) { |
|
152 | + } elseif (is_dir($subModelsDirName = $dirName.$filename.DIRECTORY_SEPARATOR)) { |
|
153 | 153 | $subModelPath = $subModelsDirName; |
154 | 154 | } |
155 | 155 | |
156 | 156 | if (isset($subModelPath)) { |
157 | 157 | loader()->addNamespace($reflection->name, $subModelPath); |
158 | 158 | |
159 | - foreach (glob($subModelPath . '*.php') as $filepath) { |
|
160 | - $this->validSubModels[ camelcase(pathinfo($filepath, PATHINFO_FILENAME)) ] = $filepath; |
|
159 | + foreach (glob($subModelPath.'*.php') as $filepath) { |
|
160 | + $this->validSubModels[camelcase(pathinfo($filepath, PATHINFO_FILENAME))] = $filepath; |
|
161 | 161 | } |
162 | 162 | } |
163 | 163 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | } |
200 | 200 | } |
201 | 201 | |
202 | - if (empty($get[ $property ])) { |
|
202 | + if (empty($get[$property])) { |
|
203 | 203 | if (o2system()->hasService($property)) { |
204 | 204 | return o2system()->getService($property); |
205 | 205 | } elseif (array_key_exists($property, $this->validSubModels)) { |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | |
217 | 217 | final protected function loadSubModel($model) |
218 | 218 | { |
219 | - if (is_file($this->validSubModels[ $model ])) { |
|
220 | - $className = '\\' . get_called_class() . '\\' . ucfirst($model); |
|
219 | + if (is_file($this->validSubModels[$model])) { |
|
220 | + $className = '\\'.get_called_class().'\\'.ucfirst($model); |
|
221 | 221 | $className = str_replace('\Base\\Model', '\Models', $className); |
222 | 222 | |
223 | 223 | if (class_exists($className)) { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * @param $className |
17 | 17 | */ |
18 | 18 | spl_autoload_register( |
19 | - function ($className) { |
|
19 | + function($className) { |
|
20 | 20 | if (strpos($className, 'O2System\Reactor\\') === false) { |
21 | 21 | return; |
22 | 22 | } |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | if ($lastNsPos = strripos($className, '\\')) { |
28 | 28 | $namespace = substr($className, 0, $lastNsPos); |
29 | 29 | $className = substr($className, $lastNsPos + 1); |
30 | - $filePath = $namespace . '\\'; |
|
30 | + $filePath = $namespace.'\\'; |
|
31 | 31 | } |
32 | 32 | |
33 | - $filePath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; |
|
33 | + $filePath .= str_replace('_', DIRECTORY_SEPARATOR, $className).'.php'; |
|
34 | 34 | |
35 | 35 | // Fixed Path |
36 | - $filePath = str_replace('O2System\Reactor\\', __DIR__ . DIRECTORY_SEPARATOR, $filePath); |
|
36 | + $filePath = str_replace('O2System\Reactor\\', __DIR__.DIRECTORY_SEPARATOR, $filePath); |
|
37 | 37 | $filePath = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $filePath); |
38 | 38 | |
39 | 39 | if (file_exists($filePath)) { |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | * |
49 | 49 | * WITH TRAILING SLASH! |
50 | 50 | */ |
51 | -if ( ! defined('PATH_VENDOR')) { |
|
52 | - define('PATH_VENDOR', PATH_ROOT . 'vendor' . DIRECTORY_SEPARATOR); |
|
51 | +if (!defined('PATH_VENDOR')) { |
|
52 | + define('PATH_VENDOR', PATH_ROOT.'vendor'.DIRECTORY_SEPARATOR); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /* |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | * |
62 | 62 | * WITH TRAILING SLASH! |
63 | 63 | */ |
64 | -if ( ! defined('PATH_FRAMEWORK')) { |
|
65 | - define('PATH_FRAMEWORK', __DIR__ . DIRECTORY_SEPARATOR); |
|
64 | +if (!defined('PATH_FRAMEWORK')) { |
|
65 | + define('PATH_FRAMEWORK', __DIR__.DIRECTORY_SEPARATOR); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /* |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | * |
75 | 75 | * WITH TRAILING SLASH! |
76 | 76 | */ |
77 | -if ( ! defined('PATH_APP')) { |
|
78 | - define('PATH_APP', PATH_ROOT . DIR_APP . DIRECTORY_SEPARATOR); |
|
77 | +if (!defined('PATH_APP')) { |
|
78 | + define('PATH_APP', PATH_ROOT.DIR_APP.DIRECTORY_SEPARATOR); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /* |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | * |
88 | 88 | * WITH TRAILING SLASH! |
89 | 89 | */ |
90 | -if ( ! defined('PATH_PUBLIC')) { |
|
91 | - define('PATH_PUBLIC', PATH_ROOT . DIR_PUBLIC . DIRECTORY_SEPARATOR); |
|
90 | +if (!defined('PATH_PUBLIC')) { |
|
91 | + define('PATH_PUBLIC', PATH_ROOT.DIR_PUBLIC.DIRECTORY_SEPARATOR); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /* |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | * |
101 | 101 | * WITH TRAILING SLASH! |
102 | 102 | */ |
103 | -if ( ! defined('PATH_CACHE')) { |
|
104 | - define('PATH_CACHE', PATH_ROOT . DIR_CACHE . DIRECTORY_SEPARATOR); |
|
103 | +if (!defined('PATH_CACHE')) { |
|
104 | + define('PATH_CACHE', PATH_ROOT.DIR_CACHE.DIRECTORY_SEPARATOR); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /* |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | * |
114 | 114 | * WITH TRAILING SLASH! |
115 | 115 | */ |
116 | -if ( ! defined('PATH_STORAGE')) { |
|
117 | - define('PATH_STORAGE', PATH_ROOT . DIR_STORAGE . DIRECTORY_SEPARATOR); |
|
116 | +if (!defined('PATH_STORAGE')) { |
|
117 | + define('PATH_STORAGE', PATH_ROOT.DIR_STORAGE.DIRECTORY_SEPARATOR); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /* |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | * |
127 | 127 | * WITH TRAILING SLASH! |
128 | 128 | */ |
129 | -if ( ! defined('PATH_RESOURCES')) { |
|
130 | - define('PATH_RESOURCES', PATH_ROOT . DIR_RESOURCES . DIRECTORY_SEPARATOR); |
|
129 | +if (!defined('PATH_RESOURCES')) { |
|
130 | + define('PATH_RESOURCES', PATH_ROOT.DIR_RESOURCES.DIRECTORY_SEPARATOR); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | * FRAMEWORK CONSTANTS |
137 | 137 | *--------------------------------------------------------------- |
138 | 138 | */ |
139 | -require __DIR__ . '/Config/Constants.php'; |
|
139 | +require __DIR__.'/Config/Constants.php'; |
|
140 | 140 | |
141 | 141 | /* |
142 | 142 | *--------------------------------------------------------------- |
143 | 143 | * FRAMEWORK HELPERS |
144 | 144 | *--------------------------------------------------------------- |
145 | 145 | */ |
146 | -require __DIR__ . '/Helpers/Reactor.php'; |
|
146 | +require __DIR__.'/Helpers/Reactor.php'; |
|
147 | 147 | |
148 | 148 | /** |
149 | 149 | * Class Reactor |
@@ -259,12 +259,12 @@ discard block |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | if (profiler() !== false) { |
262 | - profiler()->watch('Instantiating Requested Commander: ' . $commander->getClass()); |
|
262 | + profiler()->watch('Instantiating Requested Commander: '.$commander->getClass()); |
|
263 | 263 | } |
264 | 264 | $requestCommander = $commander->getInstance(); |
265 | 265 | |
266 | 266 | if (profiler() !== false) { |
267 | - profiler()->watch('Execute Requested Commander: ' . $commander->getClass()); |
|
267 | + profiler()->watch('Execute Requested Commander: '.$commander->getClass()); |
|
268 | 268 | } |
269 | 269 | $requestCommander->execute(); |
270 | 270 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | } |
322 | 322 | |
323 | 323 | if (profiler() !== false) { |
324 | - profiler()->watch('Instantiating Requested Controller: ' . $controller->getClass()); |
|
324 | + profiler()->watch('Instantiating Requested Controller: '.$controller->getClass()); |
|
325 | 325 | } |
326 | 326 | $requestController = $controller->getInstance(); |
327 | 327 |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | public function __construct() |
38 | 38 | { |
39 | 39 | if ($config = config()->loadFile('database', true)) { |
40 | - if ( ! empty($config[ 'default' ][ 'hostname' ]) AND ! empty($config[ 'default' ][ 'username' ])) { |
|
40 | + if (!empty($config['default']['hostname']) AND !empty($config['default']['username'])) { |
|
41 | 41 | |
42 | - if(profiler() !== false) { |
|
42 | + if (profiler() !== false) { |
|
43 | 43 | profiler()->watch('Starting Database Service'); |
44 | 44 | } |
45 | 45 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | if (isset($service) && $service instanceof SplServiceRegistry) { |
72 | 72 | if (profiler() !== false) { |
73 | - profiler()->watch('Load New Model: ' . $service->getClassName()); |
|
73 | + profiler()->watch('Load New Model: '.$service->getClassName()); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | $this->register($service, $offset); |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | public function add($model, $offset = null) |
89 | 89 | { |
90 | 90 | if (is_object($service)) { |
91 | - if ( ! $service instanceof SplServiceRegistry) { |
|
91 | + if (!$service instanceof SplServiceRegistry) { |
|
92 | 92 | $service = new SplServiceRegistry($service); |
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | 96 | if (profiler() !== false) { |
97 | - profiler()->watch('Add New Model: ' . $service->getClassName()); |
|
97 | + profiler()->watch('Add New Model: '.$service->getClassName()); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | $this->register($service, $offset); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $this->attach($offset, $service); |
123 | 123 | |
124 | 124 | if (profiler() !== false) { |
125 | - profiler()->watch('Register New Model: ' . $service->getClassName()); |
|
125 | + profiler()->watch('Register New Model: '.$service->getClassName()); |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | } |