Skip to content

Commit 3dadb2b

Browse files
committed
Merge pull request #139 from netroby/feature/strict-check-buck
Strict check BucketManager, typo fixes
2 parents 2e99d06 + 88e3b14 commit 3dadb2b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Qiniu/Storage/BucketManager.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(Auth $auth)
2727
*/
2828
public function buckets()
2929
{
30-
return $this->rsget('/buckets');
30+
return $this->rsGet('/buckets');
3131
}
3232

3333
/**
@@ -67,10 +67,10 @@ public function listFiles($bucket, $prefix = null, $marker = null, $limit = 1000
6767
}
6868
$url = Config::RSF_HOST . '/list?' . http_build_query($query);
6969
list($ret, $error) = $this->get($url);
70-
if ($ret == null) {
70+
if ($ret === null) {
7171
return array(null, null, $error);
7272
}
73-
$marker = isset($ret['marker']) ? $ret['marker'] : null;
73+
$marker = array_key_exists('marker', $ret) ? $ret['marker'] : null;
7474
return array($ret['items'], $marker, null);
7575
}
7676

@@ -291,7 +291,7 @@ private function post($url, $body)
291291
if (!$ret->ok()) {
292292
return array(null, new Error($url, $ret));
293293
}
294-
$r = $ret->body == null ? array() : $ret->json();
294+
$r = ($ret->body === null) ? array() : $ret->json();
295295
return array($r, null);
296296
}
297297

@@ -335,7 +335,7 @@ private static function oneKeyBatch($operation, $bucket, $keys)
335335

336336
private static function twoKeyBatch($operation, $source_bucket, $key_pairs, $target_bucket)
337337
{
338-
if ($target_bucket == null) {
338+
if ($target_bucket === null) {
339339
$target_bucket = $source_bucket;
340340
}
341341
$data = array();

0 commit comments

Comments
 (0)