Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
kduma authored and StyleCIBot committed Dec 2, 2016
1 parent 11a60e4 commit 1c18dd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ public static function file($hash_file)
public static function stream($stream, $checksums_string)
{
$sha1 = hash_init('sha1');
$md5 = hash_init('md5');
$md5 = hash_init('md5');

while ($buffer = fread($stream, 1024)) {
hash_update($sha1, $buffer);
hash_update($md5, $buffer);
}

$sha1 = hash_final($sha1);
$md5 = hash_final($md5);
$md5 = hash_final($md5);

$hashes = (new Unpacker())->unpack($checksums_string);

Expand Down
4 changes: 2 additions & 2 deletions src/Hasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public static function file($real_file)
public static function stream($stream)
{
$sha1 = hash_init('sha1');
$md5 = hash_init('md5');
$md5 = hash_init('md5');

while ($buffer = fread($stream, 1024)) {
hash_update($sha1, $buffer);
hash_update($md5, $buffer);
}

$sha1 = hash_final($sha1);
$md5 = hash_final($md5);
$md5 = hash_final($md5);

return (new Packer())->pack(['sha1' => $sha1, 'md5' => $md5]);
}
Expand Down

0 comments on commit 1c18dd1

Please sign in to comment.