mirror of
https://github.com/YGGverse/parser-php.git
synced 2026-03-31 17:25:28 +00:00
add trim to filterInfoHash method
This commit is contained in:
parent
6c73a68024
commit
c32a3b5f7d
1 changed files with 10 additions and 8 deletions
|
|
@ -21,14 +21,16 @@ class Magnet {
|
||||||
|
|
||||||
public static function filterInfoHash(string $value) : string
|
public static function filterInfoHash(string $value) : string
|
||||||
{
|
{
|
||||||
return str_replace(
|
return trim(
|
||||||
[
|
str_replace(
|
||||||
'urn:',
|
[
|
||||||
'btih:',
|
'urn:',
|
||||||
'btmh:',
|
'btih:',
|
||||||
],
|
'btmh:',
|
||||||
false,
|
],
|
||||||
$value
|
false,
|
||||||
|
$value
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue