updated composer
This commit is contained in:
Vendored
+21
-4
@@ -217,6 +217,8 @@ final class BigInteger extends BigNumber
|
||||
*
|
||||
* Using the default random bytes generator, this method is suitable for cryptographic use.
|
||||
*
|
||||
* @psalm-param callable(int): string $randomBytesGenerator
|
||||
*
|
||||
* @param int $numBits The number of bits.
|
||||
* @param callable|null $randomBytesGenerator A function that accepts a number of bytes as an integer, and returns a
|
||||
* string of random bytes of the given length. Defaults to the
|
||||
@@ -256,6 +258,8 @@ final class BigInteger extends BigNumber
|
||||
*
|
||||
* Using the default random bytes generator, this method is suitable for cryptographic use.
|
||||
*
|
||||
* @psalm-param (callable(int): string)|null $randomBytesGenerator
|
||||
*
|
||||
* @param BigNumber|int|float|string $min The lower bound. Must be convertible to a BigInteger.
|
||||
* @param BigNumber|int|float|string $max The upper bound. Must be convertible to a BigInteger.
|
||||
* @param callable|null $randomBytesGenerator A function that accepts a number of bytes as an integer,
|
||||
@@ -300,7 +304,10 @@ final class BigInteger extends BigNumber
|
||||
*/
|
||||
public static function zero() : BigInteger
|
||||
{
|
||||
/** @psalm-suppress ImpureStaticVariable */
|
||||
/**
|
||||
* @psalm-suppress ImpureStaticVariable
|
||||
* @var BigInteger|null $zero
|
||||
*/
|
||||
static $zero;
|
||||
|
||||
if ($zero === null) {
|
||||
@@ -319,7 +326,10 @@ final class BigInteger extends BigNumber
|
||||
*/
|
||||
public static function one() : BigInteger
|
||||
{
|
||||
/** @psalm-suppress ImpureStaticVariable */
|
||||
/**
|
||||
* @psalm-suppress ImpureStaticVariable
|
||||
* @var BigInteger|null $one
|
||||
*/
|
||||
static $one;
|
||||
|
||||
if ($one === null) {
|
||||
@@ -338,7 +348,10 @@ final class BigInteger extends BigNumber
|
||||
*/
|
||||
public static function ten() : BigInteger
|
||||
{
|
||||
/** @psalm-suppress ImpureStaticVariable */
|
||||
/**
|
||||
* @psalm-suppress ImpureStaticVariable
|
||||
* @var BigInteger|null $ten
|
||||
*/
|
||||
static $ten;
|
||||
|
||||
if ($ten === null) {
|
||||
@@ -1070,7 +1083,10 @@ final class BigInteger extends BigNumber
|
||||
|
||||
if ($signed) {
|
||||
if ($this->isNegative()) {
|
||||
$hex = \bin2hex(~\hex2bin($hex));
|
||||
$bin = \hex2bin($hex);
|
||||
assert($bin !== false);
|
||||
|
||||
$hex = \bin2hex(~$bin);
|
||||
$hex = self::fromBase($hex, 16)->plus(1)->toBase(16);
|
||||
|
||||
$hexLength = \strlen($hex);
|
||||
@@ -1116,6 +1132,7 @@ final class BigInteger extends BigNumber
|
||||
* This method is only here to implement interface Serializable and cannot be accessed directly.
|
||||
*
|
||||
* @internal
|
||||
* @psalm-suppress RedundantPropertyInitializationCheck
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user