Loading psalm.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ <psalm errorLevel="4" resolveFromConfigFile="true" findUnusedBaselineEntry="true" findUnusedCode="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" Loading src/Bencode.php +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ declare(strict_types=1); namespace Arokettu\Bencode; /** * @psalm-api */ final class Bencode { /** Loading src/Types/BigIntType.php +12 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ final class BigIntType implements \Stringable } } /** * @psalm-api */ public function getValue(): string { return $this->value; Loading @@ -32,17 +35,26 @@ final class BigIntType implements \Stringable return $this->value; } /** * @psalm-api */ public function toGMP(): \GMP { return \gmp_init($this->value); } /** * @psalm-api */ public function toPear(): \Math_BigInteger { /** @psalm-suppress InvalidArgument bad annotation in Math_BigInteger */ return new \Math_BigInteger($this->value); } /** * @psalm-api */ public function toBrickMath(): BigInteger { return BigInteger::of($this->value); Loading src/Types/IterableTypeTrait.php +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ trait IterableTypeTrait private Traversable $traversable; /** * @psalm-api * @param iterable $iterable Iterable to be wrapped */ public function __construct(iterable $iterable) Loading Loading
psalm.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ <psalm errorLevel="4" resolveFromConfigFile="true" findUnusedBaselineEntry="true" findUnusedCode="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" Loading
src/Bencode.php +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ declare(strict_types=1); namespace Arokettu\Bencode; /** * @psalm-api */ final class Bencode { /** Loading
src/Types/BigIntType.php +12 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ final class BigIntType implements \Stringable } } /** * @psalm-api */ public function getValue(): string { return $this->value; Loading @@ -32,17 +35,26 @@ final class BigIntType implements \Stringable return $this->value; } /** * @psalm-api */ public function toGMP(): \GMP { return \gmp_init($this->value); } /** * @psalm-api */ public function toPear(): \Math_BigInteger { /** @psalm-suppress InvalidArgument bad annotation in Math_BigInteger */ return new \Math_BigInteger($this->value); } /** * @psalm-api */ public function toBrickMath(): BigInteger { return BigInteger::of($this->value); Loading
src/Types/IterableTypeTrait.php +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ trait IterableTypeTrait private Traversable $traversable; /** * @psalm-api * @param iterable $iterable Iterable to be wrapped */ public function __construct(iterable $iterable) Loading