55use ArrayObject ;
66use InvalidArgumentException ;
77use Traversable ;
8+ use Wikibase \DataModel \Statement \Statement ;
89
910/**
1011 * A claim (identified using it's GUID) can only be added once.
@@ -24,7 +25,7 @@ class Claims extends ArrayObject {
2425 * @since 0.3
2526 * @deprecated since 1.0, use StatementList instead.
2627 *
27- * @param Claim []|Traversable|null $input
28+ * @param Statement []|Traversable|null $input
2829 *
2930 * @throws InvalidArgumentException
3031 */
@@ -58,12 +59,12 @@ private function getGuidKey( $guid ) {
5859 }
5960
6061 /**
61- * @param Claim $claim
62+ * @param Statement $claim
6263 *
6364 * @throws InvalidArgumentException
6465 * @return string
6566 */
66- private function getClaimKey ( Claim $ claim ) {
67+ private function getClaimKey ( Statement $ claim ) {
6768 $ guid = $ claim ->getGuid ();
6869
6970 if ( $ guid === null ) {
@@ -78,11 +79,11 @@ private function getClaimKey( Claim $claim ) {
7879 * @since 0.1
7980 * @deprecated since 1.0, use StatementList::addStatement() instead.
8081 *
81- * @param Claim $claim
82+ * @param Statement $claim
8283 *
8384 * @throws InvalidArgumentException
8485 */
85- public function addClaim ( Claim $ claim ) {
86+ public function addClaim ( Statement $ claim ) {
8687 if ( func_num_args () > 1 ) {
8788 throw new InvalidArgumentException ( '$index is not supported any more ' );
8889 }
@@ -120,7 +121,7 @@ public function removeClaimWithGuid( $claimGuid ) {
120121 *
121122 * @param string $claimGuid
122123 *
123- * @return Claim |null
124+ * @return Statement |null
124125 */
125126 public function getClaimWithGuid ( $ claimGuid ) {
126127 if ( $ this ->offsetExists ( $ claimGuid ) ) {
@@ -151,7 +152,7 @@ public function offsetExists( $guid ) {
151152 *
152153 * @param string $guid
153154 *
154- * @return Claim
155+ * @return Statement
155156 *
156157 * @throws InvalidArgumentException
157158 */
@@ -165,13 +166,13 @@ public function offsetGet( $guid ) {
165166 * @deprecated since 1.0, should never be called.
166167 *
167168 * @param string $guid
168- * @param Claim $claim
169+ * @param Statement $claim
169170 *
170171 * @throws InvalidArgumentException
171172 */
172173 public function offsetSet ( $ guid , $ claim ) {
173- if ( !( $ claim instanceof Claim ) ) {
174- throw new InvalidArgumentException ( '$claim must be an instance of Claim ' );
174+ if ( !( $ claim instanceof Statement ) ) {
175+ throw new InvalidArgumentException ( '$claim must be an instance of Statement ' );
175176 }
176177
177178 $ claimKey = $ this ->getClaimKey ( $ claim );
0 commit comments