File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 * `Statement::setClaim` and `Statement::getClaim` have been removed
1212 * Removed `ClaimList`
1313 * Removed `ClaimListAccess`
14+ * Removed `hasClaims` from all entity classes
1415* Removed ` Claims::getBestClaims ` (you can use ` StatementList::getBestStatements ` instead)
1516* Removed ` Claims::getByRank ` and ` Claims::getByRanks ` (you can use ` StatementList::getWithRank ` instead)
1617* Removed ` Claims::getMainSnaks ` (you can use ` StatementList::getMainSnaks ` instead)
Original file line number Diff line number Diff line change @@ -371,21 +371,6 @@ public function getClaims() {
371371 return array ();
372372 }
373373
374- /**
375- * Convenience function to check if the entity contains any claims.
376- *
377- * On top of being a convenience function, this implementation allows for doing
378- * the check without forcing an unstub in contrast to count( $this->getClaims() ).
379- *
380- * @since 0.2
381- * @deprecated since 1.0, use getStatements()->isEmpty() instead.
382- *
383- * @return bool
384- */
385- public function hasClaims () {
386- return false ;
387- }
388-
389374 /**
390375 * @since 0.3
391376 * @deprecated since 1.0, use new Statement() instead.
Original file line number Diff line number Diff line change @@ -290,15 +290,6 @@ public function setClaims( Claims $claims ) {
290290 $ this ->statements = new StatementList ( iterator_to_array ( $ claims ) );
291291 }
292292
293- /**
294- * @deprecated since 1.0, use getStatements()->isEmpty() instead.
295- *
296- * @return bool
297- */
298- public function hasClaims () {
299- return !$ this ->statements ->isEmpty ();
300- }
301-
302293 /**
303294 * @see Comparable::equals
304295 *
Original file line number Diff line number Diff line change @@ -223,15 +223,6 @@ public function setClaims( Claims $claims ) {
223223 $ this ->statements = new StatementList ( iterator_to_array ( $ claims ) );
224224 }
225225
226- /**
227- * @deprecated since 1.0, use getStatements()->isEmpty() instead.
228- *
229- * @return bool
230- */
231- public function hasClaims () {
232- return !$ this ->statements ->isEmpty ();
233- }
234-
235226 /**
236227 * @deprecated since 1.0, use new Statement() instead.
237228 *
Original file line number Diff line number Diff line change @@ -403,17 +403,6 @@ public function testSerialize( Entity $entity ) {
403403 $ this ->assertEquals ( $ entity ->getId (), $ instance ->getId () );
404404 }
405405
406- /**
407- * @dataProvider instanceProvider
408- * @param Entity $entity
409- */
410- public function testHasClaims ( Entity $ entity ) {
411- $ has = $ entity ->hasClaims ();
412- $ this ->assertInternalType ( 'boolean ' , $ has );
413-
414- $ this ->assertEquals ( count ( $ entity ->getClaims () ) !== 0 , $ has );
415- }
416-
417406 public function diffProvider () {
418407 $ argLists = array ();
419408
You can’t perform that action at this time.
0 commit comments