Skip to content

Commit 80de39b

Browse files
authored
Merge pull request #241 from jemygraw/master
use `phpcs --standard=PSR2` to fix the code style
2 parents 66381af + fb9dc1a commit 80de39b

30 files changed

+119
-114
lines changed

examples/cdn_get_bandwidth.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,16 @@
2525
$granularity = "day";
2626

2727
//获取带宽数据
28-
list($bandwidthData, $getBandwidthErr) = $cdnManager->getBandwidthData($domains, $startDate, $endDate, $granularity);
28+
list($bandwidthData, $getBandwidthErr) = $cdnManager->getBandwidthData(
29+
$domains,
30+
$startDate,
31+
$endDate,
32+
$granularity
33+
);
34+
2935
if ($getBandwidthErr != null) {
3036
var_dump($getBandwidthErr);
3137
} else {
3238
echo "get bandwidth data success\n";
3339
print_r($bandwidthData);
34-
}
40+
}

examples/cdn_get_log_list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"phpsdk.qiniudn.com"
1616
);
1717

18-
$logDate='2017-08-20';
18+
$logDate = '2017-08-20';
1919

2020
//获取日志下载链接
2121
//参考文档:http://developer.qiniu.com/article/fusion/api/log.html

examples/cdn_refresh_urls_dirs.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@
5050
echo "refresh request sent\n";
5151
print_r($refreshResult);
5252
}
53-

examples/pfop_vframe.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
$notifyUrl = 'http://375dec79.ngrok.com/notify.php';
2121
$force = false;
2222

23-
$config =new \Qiniu\Config();
24-
$config->useHTTPS=true;
23+
$config = new \Qiniu\Config();
24+
$config->useHTTPS = true;
2525
$pfop = new PersistentFop($auth, $config);
2626

2727
//要进行视频截图操作
28-
$fops = "vframe/jpg/offset/1/w/480/h/360/rotate/90|saveas/" . \Qiniu\base64_urlSafeEncode($bucket . ":qiniu_480x360.jpg");
28+
$fops = "vframe/jpg/offset/1/w/480/h/360/rotate/90|saveas/" .
29+
\Qiniu\base64_urlSafeEncode($bucket . ":qiniu_480x360.jpg");
2930

3031
list($id, $err) = $pfop->execute($bucket, $key, $fops, $pipeline, $notifyUrl, $force);
3132
echo "\n====> pfop avthumb result: \n";

examples/pfop_watermark.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
$base64URL = Qiniu\base64_urlSafeEncode('http://devtools.qiniu.com/qiniu.png');
3232

3333
//水印参数
34-
$fops = "avthumb/mp4/s/640x360/vb/1.4m/image/" . $base64URL . "|saveas/" . \Qiniu\base64_urlSafeEncode($bucket . ":qiniu_wm.mp4");
34+
$fops = "avthumb/mp4/s/640x360/vb/1.4m/image/" . $base64URL . "|saveas/"
35+
. \Qiniu\base64_urlSafeEncode($bucket . ":qiniu_wm.mp4");
3536

3637
list($id, $err) = $pfop->execute($bucket, $key, $fops, $pipeline, $notifyUrl, $force);
3738
echo "\n====> pfop avthumb result: \n";

examples/qetag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
require_once __DIR__ . '/../autoload.php';
33
use Qiniu\Etag;
44

5-
$localFile="/Users/jemy/Documents/qiniu.mp4";
5+
$localFile = "/Users/jemy/Documents/qiniu.mp4";
66
list($etag, $err) = Etag::sum($localFile);
77
if ($err == null) {
8-
echo "Etag: $etag";
8+
echo "Etag: $etag";
99
} else {
1010
var_dump($err);
1111
}

examples/rs_change_mime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
$bucket = getenv('QINIU_TEST_BUCKET');
99

1010
$key = 'qiniu.mp4';
11-
$newMime='video/x-mp4';
11+
$newMime = 'video/x-mp4';
1212

1313
$auth = new Auth($accessKey, $secretKey);
1414
$config = new \Qiniu\Config();
1515
$bucketManager = new \Qiniu\Storage\BucketManager($auth, $config);
1616

17-
$err = $bucketManager->changeMime($bucket,$key,$newMime);
17+
$err = $bucketManager->changeMime($bucket, $key, $newMime);
1818
if ($err) {
1919
print_r($err);
2020
}

examples/rs_delete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
$err = $bucketManager->delete($bucket, $key);
1515
if ($err) {
1616
print_r($err);
17-
}
17+
}

examples/rs_stat.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
$secretKey = getenv('QINIU_SECRET_KEY');
88
$bucket = getenv('QINIU_TEST_BUCKET');
99

10-
$key="qiniu.mp4";
10+
$key = "qiniu.mp4";
1111
$auth = new Auth($accessKey, $secretKey);
1212
$config = new \Qiniu\Config();
1313
$bucketManager = new \Qiniu\Storage\BucketManager($auth, $config);
14-
list($fileInfo,$err)=$bucketManager->stat($bucket, $key);
14+
list($fileInfo, $err) = $bucketManager->stat($bucket, $key);
1515
if ($err) {
1616
print_r($err);
1717
} else {

examples/rsf_list_files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
echo "\n====> list file err: \n";
3131
var_dump($err);
3232
} else {
33-
if(array_key_exists('marker',$ret)) {
33+
if (array_key_exists('marker', $ret)) {
3434
echo "Marker:" . $ret["marker"] . "\n";
3535
}
3636
echo "\nList Iterms====>\n";

0 commit comments

Comments
 (0)