Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
oiuv committed Aug 18, 2020
1 parent 3c39386 commit 4ddacc4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/db.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function connect($host = DH, $dbuser = DU, $password = DP, $dbname = DB,
{
$dbcode = str_replace('-', '', $dbcode);
if (!$this->linkid) {
$this->linkid = mysql_connect($host, $dbuser, $password) or die('Mysql数据库连接失败,请检查数据库用户名和密码是否正确!');
$this->linkid = mysql_connect($host, $dbuser, $password) or exit('Mysql数据库连接失败,请检查数据库用户名和密码是否正确!');
}
$version = $this->getVersion();

Expand All @@ -45,7 +45,7 @@ public function connect($host = DH, $dbuser = DU, $password = DP, $dbname = DB,
mysql_query("SET sql_mode=''", $this->linkid);
}
} else {
die('Mysql版本过低,请更换5.0以上版本!');
exit('Mysql版本过低,请更换5.0以上版本!');
}
mysql_select_db($dbname, $this->linkid);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/include/alipay.func.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function charsetEncode($input, $_output_charset, $_input_charset)
} elseif (function_exists('iconv')) {
$output = iconv($_input_charset, $_output_charset, $input);
} else {
die('sorry, you have no libs support for charset change.');
exit('sorry, you have no libs support for charset change.');
}

return $output;
Expand All @@ -198,7 +198,7 @@ function charsetDecode($input, $_input_charset, $_output_charset)
} elseif (function_exists('iconv')) {
$output = iconv($_input_charset, $_output_charset, $input);
} else {
die('sorry, you have no libs support for charset changes.');
exit('sorry, you have no libs support for charset changes.');
}

return $output;
Expand Down
2 changes: 1 addition & 1 deletion lib/include/phpqrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ public function convertData()
$this->setVersion($ver);
}

for (; ;) {
for (;;) {
$bits = $this->createBitStream();

if ($bits < 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/init.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function run()
$run = new action($this);
$run->display();
} else {
die('error:Unknown app to load, the app is '.$app);
exit('error:Unknown app to load, the app is '.$app);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/tpl.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function readTpl($file)
return $this->fl->readFile($file);
}

die('The template not fount which name is '.$file);
exit('The template not fount which name is '.$file);
}

//判断字符值是否存在,并返回指定类型的值
Expand Down Expand Up @@ -500,7 +500,7 @@ public function readTpl($file)
return $this->fl->readFile($file);
}

die('The template not fount which name is '.$file);
exit('The template not fount which name is '.$file);
}

//判断字符值是否存在,并返回指定类型的值
Expand Down
6 changes: 3 additions & 3 deletions lib/wechat.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ public function valid($return = false)
}
if ($echoStr) {
if ($this->checkSignature()) {
die($echoStr);
exit($echoStr);
}

die('no access');
exit('no access');
}
if ($this->checkSignature()) {
return true;
}

die('no access');
exit('no access');

return false;
}
Expand Down

0 comments on commit 4ddacc4

Please sign in to comment.