Skip to content

Commit

Permalink
Merge pull request #139 from netroby/feature/strict-check-buck
Browse files Browse the repository at this point in the history
Strict check BucketManager, typo fixes
  • Loading branch information
longbai committed Jul 24, 2015
2 parents 2e99d06 + 88e3b14 commit 3dadb2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Qiniu/Storage/BucketManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(Auth $auth)
*/
public function buckets()
{
return $this->rsget('/buckets');
return $this->rsGet('/buckets');
}

/**
Expand Down Expand Up @@ -67,10 +67,10 @@ public function listFiles($bucket, $prefix = null, $marker = null, $limit = 1000
}
$url = Config::RSF_HOST . '/list?' . http_build_query($query);
list($ret, $error) = $this->get($url);
if ($ret == null) {
if ($ret === null) {
return array(null, null, $error);
}
$marker = isset($ret['marker']) ? $ret['marker'] : null;
$marker = array_key_exists('marker', $ret) ? $ret['marker'] : null;
return array($ret['items'], $marker, null);
}

Expand Down Expand Up @@ -291,7 +291,7 @@ private function post($url, $body)
if (!$ret->ok()) {
return array(null, new Error($url, $ret));
}
$r = $ret->body == null ? array() : $ret->json();
$r = ($ret->body === null) ? array() : $ret->json();
return array($r, null);
}

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

private static function twoKeyBatch($operation, $source_bucket, $key_pairs, $target_bucket)
{
if ($target_bucket == null) {
if ($target_bucket === null) {
$target_bucket = $source_bucket;
}
$data = array();
Expand Down

0 comments on commit 3dadb2b

Please sign in to comment.