mirror of
https://github.com/YGGverse/parser-php.git
synced 2026-03-31 17:25:28 +00:00
Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74de022cd5 | ||
|
|
26111fce28 | ||
|
|
47c7d13697 | ||
|
|
81f019be7a | ||
|
|
c32a3b5f7d |
4 changed files with 15 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace YGGverse\Parser;
|
||||
namespace Yggverse\Parser;
|
||||
|
||||
class Magnet {
|
||||
|
||||
|
|
@ -16,19 +16,21 @@ class Magnet {
|
|||
|
||||
public static function isXTv2(string $xt) : bool
|
||||
{
|
||||
return ('urn' == parse_url($xt, PHP_URL_SCHEME) && false !== strpos($xt, ':btmh:'));
|
||||
return ('urn' == parse_url($xt, PHP_URL_SCHEME) && false !== strpos($xt, ':btmh:1220'));
|
||||
}
|
||||
|
||||
public static function filterInfoHash(string $value) : string
|
||||
{
|
||||
return str_replace(
|
||||
[
|
||||
'urn:',
|
||||
'btih:',
|
||||
'btmh:',
|
||||
],
|
||||
false,
|
||||
$value
|
||||
return trim(
|
||||
str_replace(
|
||||
[
|
||||
'urn:',
|
||||
'btih:',
|
||||
'btmh:1220',
|
||||
],
|
||||
false,
|
||||
$value
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace YGGverse\Parser;
|
||||
namespace Yggverse\Parser;
|
||||
|
||||
class Url {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace YGGverse\Parser;
|
||||
namespace Yggverse\Parser;
|
||||
|
||||
class Urn {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace YGGverse\Parser\Tests;
|
||||
namespace Yggverse\Parser\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue