Compare commits

..

No commits in common. "main" and "0.3.0" have entirely different histories.
main ... 0.3.0

4 changed files with 13 additions and 15 deletions

View file

@ -1,6 +1,6 @@
<?php
namespace Yggverse\Parser;
namespace YGGverse\Parser;
class Magnet {
@ -16,21 +16,19 @@ class Magnet {
public static function isXTv2(string $xt) : bool
{
return ('urn' == parse_url($xt, PHP_URL_SCHEME) && false !== strpos($xt, ':btmh:1220'));
return ('urn' == parse_url($xt, PHP_URL_SCHEME) && false !== strpos($xt, ':btmh:'));
}
public static function filterInfoHash(string $value) : string
{
return trim(
str_replace(
return str_replace(
[
'urn:',
'btih:',
'btmh:1220',
'btmh:',
],
false,
$value
)
);
}

View file

@ -1,6 +1,6 @@
<?php
namespace Yggverse\Parser;
namespace YGGverse\Parser;
class Url {

View file

@ -1,6 +1,6 @@
<?php
namespace Yggverse\Parser;
namespace YGGverse\Parser;
class Urn {

View file

@ -1,6 +1,6 @@
<?php
namespace Yggverse\Parser\Tests;
namespace YGGverse\Parser\Tests;
use PHPUnit\Framework\TestCase;