Skip to content

Commit ce22d01

Browse files
Update
1 parent 553cba5 commit ce22d01

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

api/index.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141

4242
// Конфигурация
43-
$config = array();
43+
$config = [];
4444
$config['settings']['db']['dir'] = $_db;
4545
$config['settings']['db']['key_cryp'] = Key::loadFromAsciiSafeString(file_get_contents($_db . 'core/key_db.txt', true));
4646
$config['settings']['db']['public_key'] = file_get_contents($_db . 'core/key_db.txt', true);
@@ -220,10 +220,10 @@
220220
}
221221

222222
if (count($rel) >= 1) {
223-
$r = array();
223+
$r = [];
224224
foreach($rel as $k => $v) {
225225
$vv = (array)$v;
226-
$ar = array();
226+
$ar = [];
227227
foreach($vv as $key => $va) {
228228
if (array_key_exists($key, $control) && $key != "password" && $key != "cookie") {
229229
$ar[$key] = $va;
@@ -527,10 +527,10 @@
527527
}
528528
}
529529
if (count($rel) >= 1) {
530-
$r = array();
530+
$r = [];
531531
foreach($rel as $k => $v) {
532532
$vv = (array)$v;
533-
$ar = array();
533+
$ar = [];
534534
foreach($vv as $key => $va) {
535535
if (array_key_exists($key, $control) && $key != "password" && $key != "cookie") {
536536
$ar[$key] = $va;
@@ -1157,7 +1157,7 @@
11571157

11581158
if ($this->get('settings')['db']["public_key"] == $public_key) {
11591159

1160-
$resp = array();
1160+
$resp = [];
11611161

11621162
if (isset($resource)) {
11631163

src/Database.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ protected function setFields()
151151
protected function setPending()
152152
{
153153
$this->pending = array(
154-
'where' => array(),
155-
'orderBy' => array(),
156-
'limit' => array(),
157-
'with' => array(),
158-
'groupBy' => array(),
154+
'where' => [],
155+
'orderBy' => [],
156+
'limit' => [],
157+
'with' => [],
158+
'groupBy' => [],
159159
);
160160
}
161161

@@ -333,7 +333,7 @@ protected function groupByPending()
333333
{
334334
$column = $this->pending['groupBy'];
335335

336-
$grouped = array();
336+
$grouped = [];
337337
foreach ($this->data as $object)
338338
{
339339
$grouped[$object->{$column}][] = $object;
@@ -581,7 +581,7 @@ public function asArray($key = null, $value = null)
581581
Validate::table($this->name)->field($value);
582582
}
583583

584-
$datas = array();
584+
$datas = [];
585585
if (!$this->resetKeys)
586586
{
587587
if (is_null($key) && is_null($value))
@@ -592,7 +592,7 @@ public function asArray($key = null, $value = null)
592592
{
593593
foreach ($this->data as $rowKey => $data)
594594
{
595-
$datas[$rowKey] = array();
595+
$datas[$rowKey] = [];
596596
foreach ($data as $row)
597597
{
598598
if (is_null($key))
@@ -844,7 +844,7 @@ public function count()
844844
{
845845
if (!$this->resetKeys)
846846
{
847-
$count = array();
847+
$count = [];
848848
foreach ($this->data as $group => $data)
849849
{
850850
$count[$group] = count($data);

src/Db.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function run()
127127
$unitCount = count($unit["schema"]);
128128

129129
if ($unitCount >= 1) {
130-
$row = array();
130+
$row = [];
131131

132132
foreach($unit["schema"] as $key => $value)
133133
{
@@ -157,7 +157,7 @@ public function run()
157157

158158
if ($unitCount >= 1) {
159159

160-
$row = array();
160+
$row = [];
161161
foreach($unit["schema"] as $key => $value)
162162
{
163163
if (isset($key) && isset($value)) {

src/Relation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ protected function join($row)
318318

319319

320320
if (empty($join))
321-
return array();
321+
return [];
322322

323323
return Database::table($this->tables['foreign'])
324324
->where($keys['foreign'], 'IN', $join[$row->{$keys['local']}]);
@@ -336,7 +336,7 @@ protected function join($row)
336336
*/
337337
public function build(array $array, $part)
338338
{
339-
$return = array();
339+
$return = [];
340340
foreach ($array as $key => $row)
341341
{
342342
if (is_object($row))

0 commit comments

Comments
 (0)