mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Prevent PHPStan error: 'Uuid::fromString() on a separate line has no effect.' (#552)
Co-authored-by: Ben Ramsey <ben@benramsey.com>
This commit is contained in:
+9
-2
@@ -19,6 +19,7 @@ use DateTimeInterface;
|
||||
use Ramsey\Uuid\Codec\CodecInterface;
|
||||
use Ramsey\Uuid\Converter\NumberConverterInterface;
|
||||
use Ramsey\Uuid\Converter\TimeConverterInterface;
|
||||
use Ramsey\Uuid\Exception\InvalidArgumentException;
|
||||
use Ramsey\Uuid\Exception\UnsupportedOperationException;
|
||||
use Ramsey\Uuid\Fields\FieldsInterface;
|
||||
use Ramsey\Uuid\Lazy\LazyUuidFromString;
|
||||
@@ -436,9 +437,10 @@ class Uuid implements UuidInterface
|
||||
* @return UuidInterface A UuidInterface instance created from a binary
|
||||
* string representation
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
|
||||
* but under constant factory setups, this method operates in functionally pure manners
|
||||
*
|
||||
* @psalm-suppress ImpureStaticProperty we know that the factory being replaced can lead to massive
|
||||
* havoc across all consumers: that should never happen, and
|
||||
* is generally to be discouraged. Until the factory is kept
|
||||
@@ -474,9 +476,10 @@ class Uuid implements UuidInterface
|
||||
* @return UuidInterface A UuidInterface instance created from a hexadecimal
|
||||
* string representation
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
|
||||
* but under constant factory setups, this method operates in functionally pure manners
|
||||
*
|
||||
* @psalm-suppress ImpureStaticProperty we know that the factory being replaced can lead to massive
|
||||
* havoc across all consumers: that should never happen, and
|
||||
* is generally to be discouraged. Until the factory is kept
|
||||
@@ -523,6 +526,8 @@ class Uuid implements UuidInterface
|
||||
* @return UuidInterface A UuidInterface instance created from the Hexadecimal
|
||||
* object representing a hexadecimal number
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
|
||||
* but under constant factory setups, this method operates in functionally pure manners
|
||||
* @psalm-suppress MixedInferredReturnType,MixedReturnStatement
|
||||
@@ -550,6 +555,8 @@ class Uuid implements UuidInterface
|
||||
* @return UuidInterface A UuidInterface instance created from the string
|
||||
* representation of a 128-bit integer
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
|
||||
* but under constant factory setups, this method operates in functionally pure manners
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user