File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33namespace Wikibase \DataModel \Entity ;
44
55/**
6- * Interface for EntityIds that can be converted to a unique, positive, signed 32 bit integer in the
7- * range [1..2147483647], and back from the entity type and the number. When an ID can not be
8- * represented as an unique integer, an InvalidArgumentException must be thrown on construction
9- * time. For example, when "Q1" and "Q01" have the same integer representation, only one should be
10- * allowed.
6+ * Interface for EntityIds that can be converted to a positive, signed 32 bit integer in the range
7+ * [1..2147483647], and back from the entity type and the number. The number must be distinct for
8+ * different IDs. When an ID can not be represented as a distinct integer, an
9+ * InvalidArgumentException must be thrown on construction time. For example, when "Q1" and "Q01"
10+ * have the same integer representation, only one should be allowed.
1111 *
1212 * Entity types that do not meet this criteria should not implement this interface.
1313 *
@@ -26,7 +26,7 @@ interface Int32EntityId {
2626 /**
2727 * @since 6.1
2828 *
29- * @return int Guaranteed to be a unique integer in the range [1..2147483647].
29+ * @return int Guaranteed to be a distinct integer in the range [1..2147483647].
3030 */
3131 public function getNumericId ();
3232
Original file line number Diff line number Diff line change @@ -49,9 +49,10 @@ private function assertValidIdFormat( $idSerialization ) {
4949 }
5050
5151 /**
52- * @return int
52+ * @see Int32EntityId::getNumericId
5353 *
5454 * @throws RuntimeException if called on a foreign ID.
55+ * @return int Guaranteed to be a distinct integer in the range [1..2147483647].
5556 */
5657 public function getNumericId () {
5758 if ( $ this ->isForeign () ) {
Original file line number Diff line number Diff line change @@ -49,9 +49,10 @@ private function assertValidIdFormat( $idSerialization ) {
4949 }
5050
5151 /**
52- * @return int
52+ * @see Int32EntityId::getNumericId
5353 *
5454 * @throws RuntimeException if called on a foreign ID.
55+ * @return int Guaranteed to be a distinct integer in the range [1..2147483647].
5556 */
5657 public function getNumericId () {
5758 if ( $ this ->isForeign () ) {
You can’t perform that action at this time.
0 commit comments