mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-26 17:46:38 +03:00
Applied fixes and suppressions (sadly) to match psalm/phpstan code quality guidelines
We have a lot of deprecated API in here which shouldn't exist in first place, but that will luckily disappear with v5.0.0 :-)
This commit is contained in:
@@ -405,6 +405,11 @@ class Uuid implements UuidInterface
|
||||
*
|
||||
* @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
|
||||
* un-replaced, this method is effectively pure.
|
||||
*/
|
||||
public static function fromBytes(string $bytes): UuidInterface
|
||||
{
|
||||
@@ -437,6 +442,11 @@ class Uuid implements UuidInterface
|
||||
*
|
||||
* @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
|
||||
* un-replaced, this method is effectively pure.
|
||||
*/
|
||||
public static function fromString(string $uuid): UuidInterface
|
||||
{
|
||||
@@ -588,6 +598,11 @@ class Uuid implements UuidInterface
|
||||
*
|
||||
* @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 ImpureMethodCall 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
|
||||
* un-replaced, this method is effectively pure.
|
||||
*/
|
||||
public static function uuid5($ns, string $name): UuidInterface
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user