Skip to content

Commit 32427d9

Browse files
committed
Apply fixes from StyleCI
1 parent a827e8a commit 32427d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+390
-396
lines changed

app/bank/controller/coupon.master.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private function batadd()
8383
if ($value > 9999) {
8484
$value = 9999;
8585
}
86-
for ($i = 0; $i < $number; ++$i) {
86+
for ($i = 0; $i < $number; $i++) {
8787
$this->coupon->randCoupon($value);
8888
}
8989
$message = [

app/certificate/controller/certificate.phone.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function display()
1616
{
1717
$action = $this->ev->url(3);
1818
if (!method_exists($this, $action)) {
19-
$action = "index";
19+
$action = 'index';
2020
}
2121
$this->$action();
2222
exit;
@@ -31,31 +31,31 @@ private function apply()
3131
if ($user['usercoin'] < $ce['ceprice']) {
3232
$message = [
3333
'statusCode' => 300,
34-
"message" => "余额不足,请到个人中心充值"
34+
'message' => '余额不足,请到个人中心充值',
3535
];
3636
exit(json_encode($message));
3737
}
3838
$cq = $this->ce->getCeQueueByArgs([
39-
["AND", "cequserid = :cequserid", "cequserid", $this->_user['sessionuserid']],
40-
["AND", "ceqceid = :ceqceid", "ceqceid", $ceid],
41-
["AND", "ceqstatus < 3"],
42-
["AND", "ceqtime >= :ceqtime", "ceqtime", TIME - $ce['cedays'] * 24 * 3600]
39+
['AND', 'cequserid = :cequserid', 'cequserid', $this->_user['sessionuserid']],
40+
['AND', 'ceqceid = :ceqceid', 'ceqceid', $ceid],
41+
['AND', 'ceqstatus < 3'],
42+
['AND', 'ceqtime >= :ceqtime', 'ceqtime', TIME - $ce['cedays'] * 24 * 3600],
4343
]);
4444
if ($cq['ceqid']) {
4545
$message = [
4646
'statusCode' => 300,
47-
"message" => "您已经申请过本证书了"
47+
'message' => '您已经申请过本证书了',
4848
];
4949
exit(json_encode($message));
5050
}
5151
$ce['cebasic'] = explode(',', $ce['cebasic']);
5252
foreach ($ce['cebasic'] as $basicid) {
5353
if ($basicid) {
54-
$eh = $this->G->make('favor', 'exam')->getExamHistoryByArgs([["AND", "ehuserid = :ehuserid", "ehuserid", $this->_user['sessionuserid']], ["AND", "ehispass = 1"], ["AND", "ehtype = 2"], ["AND", "ehbasicid = :ehbasicid", "ehbasicid", $basicid]]);
54+
$eh = $this->G->make('favor', 'exam')->getExamHistoryByArgs([['AND', 'ehuserid = :ehuserid', 'ehuserid', $this->_user['sessionuserid']], ['AND', 'ehispass = 1'], ['AND', 'ehtype = 2'], ['AND', 'ehbasicid = :ehbasicid', 'ehbasicid', $basicid]]);
5555
if (!$eh['ehid']) {
5656
$message = [
5757
'statusCode' => 300,
58-
"message" => "您需要通过考试后才能申请"
58+
'message' => '您需要通过考试后才能申请',
5959
];
6060
exit(json_encode($message));
6161
}
@@ -65,7 +65,7 @@ private function apply()
6565
if (!$info['useraddress'] || !$info['userphone']) {
6666
$message = [
6767
'statusCode' => 300,
68-
"message" => "请填写地址和联系电话"
68+
'message' => '请填写地址和联系电话',
6969
];
7070
exit(json_encode($message));
7171
}
@@ -82,14 +82,13 @@ private function apply()
8282
$user = $this->user->getUserById($this->_user['sessionuserid']);
8383
$message = [
8484
'statusCode' => 200,
85-
"message" => "操作成功",
86-
"callbackType" => "forward",
87-
"forwardUrl" => "index.php?certificate"
85+
'message' => '操作成功',
86+
'callbackType' => 'forward',
87+
'forwardUrl' => 'index.php?certificate',
8888
];
8989
exit(json_encode($message));
9090
}
9191

92-
9392
$this->tpl->assign('ce', $ce);
9493
$this->tpl->display('certificate_apply');
9594
}

app/content/cls/content.cls.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ public function _init()
3434

3535
public function setViewNumber($contentid)
3636
{
37-
$data = [false, 'content', [['AND', "contentid = :contentid", 'contentid', $contentid]]];
37+
$data = [false, 'content', [['AND', 'contentid = :contentid', 'contentid', $contentid]]];
3838
$sql = $this->pdosql->makeSelect($data);
3939
$r = $this->db->fetch($sql);
4040
$number = $r['contentview'] + 1;
4141
$data = [
4242
'table' => 'content',
4343
'value' => ['contentview' => $number],
44-
'query' => [['AND', "contentid = :contentid", 'contentid', $contentid]]
44+
'query' => [['AND', 'contentid = :contentid', 'contentid', $contentid]],
4545
];
4646
$this->db->updateElement($data);
4747
}

app/content/controller/category.phone.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ private function index()
3030
if ($cat['catuseurl'] && $cat['caturl']) {
3131
$message = [
3232
'statusCode' => 201,
33-
"message" => "操作成功",
34-
"callbackType" => "forward",
35-
"forwardUrl" => html_entity_decode($cat['caturl'])
33+
'message' => '操作成功',
34+
'callbackType' => 'forward',
35+
'forwardUrl' => html_entity_decode($cat['caturl']),
3636
];
3737
exit(json_encode($message));
3838
}

app/content/controller/content.phone.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function index()
3636
if ($content['contentlink']) {
3737
$message = [
3838
'statusCode' => 201,
39-
"message" => "操作成功",
40-
"callbackType" => "forward",
41-
"forwardUrl" => html_entity_decode($content['contentlink'])
39+
'message' => '操作成功',
40+
'callbackType' => 'forward',
41+
'forwardUrl' => html_entity_decode($content['contentlink']),
4242
];
4343
exit(json_encode($message));
4444
}

app/core/controller/index.api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private function basic()
278278
$this->db->exec($sql);
279279
}
280280
}
281-
++$page;
281+
$page++;
282282
echo 'ok';
283283
if (count($rs) > 0) {
284284
echo '<script>window.location = "index.php?core-api-index-basic&page='.$page.'"</script>';

app/course/cls/course.cls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getCourseContentStatus($courseid, $userid)
7070
if ($rs['logstatus']) {
7171
$cdata['content'][$i] = $rs['logid'];
7272
}
73-
++$i;
73+
$i++;
7474
}
7575
foreach ($cdata['course'] as $key => $p) {
7676
if ($key) {

app/course/controller/category.phone.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ private function index()
3030
if ($cat['catuseurl'] && $cat['caturl']) {
3131
$message = [
3232
'statusCode' => 201,
33-
"message" => "操作成功",
34-
"callbackType" => "forward",
35-
"forwardUrl" => html_entity_decode($cat['caturl'])
33+
'message' => '操作成功',
34+
'callbackType' => 'forward',
35+
'forwardUrl' => html_entity_decode($cat['caturl']),
3636
];
3737
exit(json_encode($message));
3838
}

app/course/controller/coupon.master.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private function batadd()
7171
if ($value > 9999) {
7272
$value = 9999;
7373
}
74-
for ($i = 0; $i < $number; ++$i) {
74+
for ($i = 0; $i < $number; $i++) {
7575
$this->coupon->randCoupon($value);
7676
}
7777
$message = [

app/document/controller/upload.api.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function index()
3434
$back = [
3535
'error' => [
3636
'number' => 105,
37-
'message' => $message
38-
]
37+
'message' => $message,
38+
],
3939
];
4040
exit(json_encode($back));
4141
}
@@ -58,15 +58,15 @@ public function index()
5858
$back = [
5959
'fileName' => $upfile['name'],
6060
'url' => $fileurl,
61-
'uploaded' => 1
61+
'uploaded' => 1,
6262
];
6363
} else {
6464
$message = '上传失败,附件类型不符!';
6565
$back = [
6666
'error' => [
6767
'number' => 105,
68-
'message' => $message
69-
]
68+
'message' => $message,
69+
],
7070
];
7171
}
7272
exit(json_encode($back));

0 commit comments

Comments
 (0)