Skip to content

Commit 84e4c92

Browse files
committed
fix(helpers): return bool for channel_hash_equals
1 parent a43781d commit 84e4c92

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/helpers.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ function channel_hash(...$values): string
3939
}
4040

4141
if (! function_exists('channel_hash_equals')) {
42-
function channel_hash_equals($signature, ...$values): string
42+
/**
43+
* Check if the provided signature matches the generated one.
44+
*
45+
* @param string $signature
46+
* @param mixed ...$values
47+
* @return bool
48+
*/
49+
function channel_hash_equals($signature, ...$values): bool
4350
{
4451
return $signature === md5(join('|', $values).config('app.key').config('app.url'));
4552
}

0 commit comments

Comments
 (0)