Skip to content

Commit d899871

Browse files
authored
Merge pull request #318 from qiniu/develop
Develop
2 parents abf34f8 + a3aaf8c commit d899871

File tree

8 files changed

+27
-27
lines changed

8 files changed

+27
-27
lines changed

src/Qiniu/Rtc/AppClient.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function createApp($hub, $title, $maxUsers = null, $noAutoKickUser = null
3333
if (!empty($maxUsers)) {
3434
$params['maxUsers'] = $maxUsers;
3535
}
36-
if (!empty($noAutoKickUser)) {
36+
if ($noAutoKickUser !== null) {
3737
$params['noAutoKickUser'] = $noAutoKickUser;
3838
}
3939
$body = json_encode($params);
@@ -65,7 +65,7 @@ public function updateApp($appId, $hub, $title, $maxUsers = null, $mergePublishR
6565
if (!empty($maxUsers)) {
6666
$params['maxUsers'] = $maxUsers;
6767
}
68-
if (!empty($noAutoKickUser)) {
68+
if ($noAutoKickUser !== null) {
6969
$params['noAutoKickUser'] = $noAutoKickUser;
7070
}
7171
if (!empty($mergePublishRtmp)) {

src/Qiniu/Sms/Sms.php

+18-18
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(Auth $auth)
3333
"signature_id": <signature_id>
3434
}
3535
*/
36-
public function createSignature(string $signature, string $source, string $pics = null)
36+
public function createSignature($signature, $source, $pics = null)
3737
{
3838
$params['signature'] = $signature;
3939
$params['source'] = $source;
@@ -62,7 +62,7 @@ public function createSignature(string $signature, string $source, string $pics
6262
"signature": string
6363
}
6464
*/
65-
public function updateSignature(string $id, string $signature, string $source, string $pics = null)
65+
public function updateSignature($id, $signature, $source, $pics = null)
6666
{
6767
$params['signature'] = $signature;
6868
$params['source'] = $source;
@@ -96,7 +96,7 @@ public function updateSignature(string $id, string $signature, string $source, s
9696
"page_size": int,
9797
}
9898
*/
99-
public function checkSignature(string $audit_status = null, int $page = 1, int $page_size = 20)
99+
public function checkSignature($audit_status = null, $page = 1, $page_size = 20)
100100
{
101101

102102
$url = sprintf(
@@ -116,7 +116,7 @@ public function checkSignature(string $audit_status = null, int $page = 1, int $
116116
* id 签名id string 类型,必填,
117117
* @retrun : 请求成功 HTTP 状态码为 200
118118
*/
119-
public function deleteSignature(string $id)
119+
public function deleteSignature($id)
120120
{
121121
$url = $this->baseURL . 'signature/' . $id;
122122
list(, $err) = $this->delete($url);
@@ -139,11 +139,11 @@ public function deleteSignature(string $id)
139139
}
140140
*/
141141
public function createTemplate(
142-
string $name,
143-
string $template,
144-
string $type,
145-
string $description,
146-
string $signture_id
142+
$name,
143+
$template,
144+
$type,
145+
$description,
146+
$signture_id
147147
) {
148148
$params['name'] = $name;
149149
$params['template'] = $template;
@@ -181,7 +181,7 @@ public function createTemplate(
181181
"page_size": int
182182
}
183183
*/
184-
public function queryTemplate(string $audit_status = null, int $page = 1, int $page_size = 20)
184+
public function queryTemplate($audit_status = null, $page = 1, $page_size = 20)
185185
{
186186

187187
$url = sprintf(
@@ -205,11 +205,11 @@ public function queryTemplate(string $audit_status = null, int $page = 1, int $p
205205
* @retrun : 请求成功 HTTP 状态码为 200
206206
*/
207207
public function updateTemplate(
208-
string $id,
209-
string $name,
210-
string $template,
211-
string $description,
212-
string $signature_id
208+
$id,
209+
$name,
210+
$template,
211+
$description,
212+
$signature_id
213213
) {
214214
$params['name'] = $name;
215215
$params['template'] = $template;
@@ -226,7 +226,7 @@ public function updateTemplate(
226226
* id :模板id string 类型,必填,
227227
* @retrun : 请求成功 HTTP 状态码为 200
228228
*/
229-
public function deleteTemplate(string $id)
229+
public function deleteTemplate($id)
230230
{
231231
$url = $this->baseURL . 'template/' . $id;
232232
list(, $err) = $this->delete($url);
@@ -243,7 +243,7 @@ public function deleteTemplate(string $id)
243243
"job_id": string
244244
}
245245
*/
246-
public function sendMessage(string $template_id, array $mobiles, array $parameters = null)
246+
public function sendMessage($template_id, $mobiles, $parameters = null)
247247
{
248248
$params['template_id'] = $template_id;
249249
$params['mobiles'] = $mobiles;
@@ -256,7 +256,7 @@ public function sendMessage(string $template_id, array $mobiles, array $paramete
256256
return $ret;
257257
}
258258

259-
public function imgToBase64(string $img_file)
259+
public function imgToBase64($img_file)
260260
{
261261
$img_base64 = '';
262262
if (file_exists($img_file)) {

src/Qiniu/Storage/BucketManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function listbuckets(
5959
$line = 'false',
6060
$shared = 'false'
6161
) {
62-
$path = '/v3/buckets?region=' . $region . '&line=' . $line . '&shared=' . $share;
62+
$path = '/v3/buckets?region=' . $region . '&line=' . $line . '&shared=' . $shared;
6363
$info = $this->ucPost($path);
6464
return $info;
6565
}

src/Qiniu/Storage/UploadManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function put(
4646
$data,
4747
$params = null,
4848
$mime = 'application/octet-stream',
49-
$fname = null
49+
$fname = "default_filename"
5050
) {
5151

5252
$params = self::trimParams($params);

tests/Qiniu/Tests/CdnManagerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function setUp()
2525

2626
$this->cdnManager = new CdnManager($testAuth);
2727
$this->encryptKey = $timestampAntiLeechEncryptKey;
28-
$this->imgUrl = $customDomain . '/24.jpg';
28+
$this->imgUrl = $customDomain . '/sdktest.png';
2929
}
3030

3131
public function testCreateTimestampAntiLeechUrl()

tests/Qiniu/Tests/DownloadTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
88
public function test()
99
{
1010
global $testAuth;
11-
$base_url = 'http://private-res.qiniudn.com/gogopher.jpg';
11+
$base_url = 'http://sdk.peterpy.cn/gogopher.jpg';
1212
$private_url = $testAuth->privateDownloadUrl($base_url);
1313
$response = Client::get($private_url);
1414
$this->assertEquals(200, $response->statusCode);
@@ -17,7 +17,7 @@ public function test()
1717
public function testFop()
1818
{
1919
global $testAuth;
20-
$base_url = 'http://private-res.qiniudn.com/gogopher.jpg?exif';
20+
$base_url = 'http://sdk.peterpy.cn/gogopher.jpg?exif';
2121
$private_url = $testAuth->privateDownloadUrl($base_url);
2222
$response = Client::get($private_url);
2323
$this->assertEquals(200, $response->statusCode);

tests/Qiniu/Tests/FopTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class FopTest extends \PHPUnit_Framework_TestCase
88
{
99
public function testExifPub()
1010
{
11-
$fop = new Operation('testres.qiniudn.com');
11+
$fop = new Operation('sdk.peterpy.cn');
1212
list($exif, $error) = $fop->execute('gogopher.jpg', 'exif');
1313
$this->assertNull($error);
1414
$this->assertNotNull($exif);

tests/bootstrap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
//cdn
2323
$timestampAntiLeechEncryptKey = getenv('QINIU_TIMESTAMP_ENCRPTKEY');
24-
$customDomain = "http://phpsdk.peterpy.cn";
24+
$customDomain = "http://sdk.peterpy.cn";
2525

2626
$tid = getenv('TRAVIS_JOB_NUMBER');
2727
if (!empty($tid)) {

0 commit comments

Comments
 (0)