Refining type of producing a string that can be declared as non-empty-string

This commit is contained in:
Marco Pivetta
2020-01-29 17:48:40 +01:00
committed by Ben Ramsey
parent 2108274b4a
commit 598b47d07f
9 changed files with 93 additions and 0 deletions
+10
View File
@@ -61,6 +61,8 @@ interface UuidInterface extends
/**
* Returns the binary string representation of the UUID
*
* @psalm-return non-empty-string
*/
public function getBytes(): string;
@@ -71,21 +73,29 @@ interface UuidInterface extends
/**
* Returns the hexadecimal string representation of the UUID
*
* @psalm-return non-empty-string
*/
public function getHex(): string;
/**
* Returns the integer value of the UUID as a string
*
* @psalm-return non-empty-string
*/
public function getInteger(): string;
/**
* Returns a string representation of the UUID
*
* @psalm-return non-empty-string
*/
public function toString(): string;
/**
* Casts the UUID to a string representation
*
* @psalm-return non-empty-string
*/
public function __toString(): string;
}