Skip to content

Commit 6e228d4

Browse files
committed
Merge pull request #132 from netroby/feature/strict-check
strict check value equals === or !==
2 parents f1fb0c7 + 2a418ec commit 6e228d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Qiniu/Etag.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private static function calcSha1($data)
2020
{
2121
$sha1Str = sha1($data, true);
2222
$err = error_get_last();
23-
if ($err != null) {
23+
if ($err !== null) {
2424
return array(null, $err);
2525
}
2626
$byteArray = unpack('C*', $sha1Str);
@@ -32,7 +32,7 @@ public static function sum($filename)
3232
{
3333
$fhandler = fopen($filename, 'r');
3434
$err = error_get_last();
35-
if ($err != null) {
35+
if ($err !== null) {
3636
return array(null, $err);
3737
}
3838

@@ -48,7 +48,7 @@ public static function sum($filename)
4848
if ($blockCnt <= 1) {
4949
array_push($sha1Buf, 0x16);
5050
$fdata = fread($fhandler, Config::BLOCK_SIZE);
51-
if ($err != null) {
51+
if ($err !== null) {
5252
fclose($fhandler);
5353
return array(null, $err);
5454
}
@@ -60,7 +60,7 @@ public static function sum($filename)
6060
for ($i=0; $i < $blockCnt; $i++) {
6161
$fdata = fread($fhandler, Config::BLOCK_SIZE);
6262
list($sha1Code, $err) = self::calcSha1($fdata);
63-
if ($err != null) {
63+
if ($err !== null) {
6464
fclose($fhandler);
6565
return array(null, $err);
6666
}

0 commit comments

Comments
 (0)