diff --git a/src/Entity/Int32EntityId.php b/src/Entity/Int32EntityId.php index 6c93b134..d1a6b657 100644 --- a/src/Entity/Int32EntityId.php +++ b/src/Entity/Int32EntityId.php @@ -3,11 +3,11 @@ namespace Wikibase\DataModel\Entity; /** - * Interface for EntityIds that can be converted to a unique, positive, signed 32 bit integer in the - * range [1..2147483647], and back from the entity type and the number. When an ID can not be - * represented as an unique integer, an InvalidArgumentException must be thrown on construction - * time. For example, when "Q1" and "Q01" have the same integer representation, only one should be - * allowed. + * Interface for EntityIds that can be converted to a positive, signed 32 bit integer in the range + * [1..2147483647], and back from the entity type and the number. The number must be distinct for + * different IDs. When an ID can not be represented as a distinct integer, an + * InvalidArgumentException must be thrown on construction time. For example, when "Q1" and "Q01" + * have the same integer representation, only one should be allowed. * * Entity types that do not meet this criteria should not implement this interface. * @@ -26,7 +26,7 @@ interface Int32EntityId { /** * @since 6.1 * - * @return int Guaranteed to be a unique integer in the range [1..2147483647]. + * @return int Guaranteed to be a distinct integer in the range [1..2147483647]. */ public function getNumericId(); diff --git a/src/Entity/ItemId.php b/src/Entity/ItemId.php index ef3d53ae..4b44161f 100644 --- a/src/Entity/ItemId.php +++ b/src/Entity/ItemId.php @@ -49,9 +49,10 @@ private function assertValidIdFormat( $idSerialization ) { } /** - * @return int + * @see Int32EntityId::getNumericId * * @throws RuntimeException if called on a foreign ID. + * @return int Guaranteed to be a distinct integer in the range [1..2147483647]. */ public function getNumericId() { if ( $this->isForeign() ) { diff --git a/src/Entity/PropertyId.php b/src/Entity/PropertyId.php index ed5e4cee..ff5e375d 100644 --- a/src/Entity/PropertyId.php +++ b/src/Entity/PropertyId.php @@ -49,9 +49,10 @@ private function assertValidIdFormat( $idSerialization ) { } /** - * @return int + * @see Int32EntityId::getNumericId * * @throws RuntimeException if called on a foreign ID. + * @return int Guaranteed to be a distinct integer in the range [1..2147483647]. */ public function getNumericId() { if ( $this->isForeign() ) {