Skip to content

Commit 105850e

Browse files
committed
Removed Claims::isEmpty
1 parent 2e004c9 commit 105850e

3 files changed

Lines changed: 1 addition & 20 deletions

File tree

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* Removed `Claims::getGuids`
1818
* Removed `Claims::equals` (and `Claims` no longer implements `Comparable`)
1919
* Removed `Claims::getHash` (and `Claims` no longer implements `Hashable`)
20+
* Removed `Claims::isEmpty` (you can use `StatementList::isEmpty` instead)
2021

2122
## Version 2.6.0 (2015-03-08)
2223

src/Claim/Claims.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,4 @@ public function offsetUnset( $guid ) {
279279
parent::offsetUnset( $key );
280280
}
281281

282-
/**
283-
* @return bool
284-
*/
285-
public function isEmpty() {
286-
return !$this->getIterator()->valid();
287-
}
288-
289282
}

tests/unit/Claim/ClaimsTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -428,17 +428,4 @@ public function testIterator() {
428428
$this->assertSame( $expected, $actual );
429429
}
430430

431-
public function testIsEmpty() {
432-
$claims = new Claims();
433-
$claim1 = $this->makeClaim( new PropertyNoValueSnak( new PropertyId( 'P15' ) ) );
434-
435-
$this->assertTrue( $claims->isEmpty() );
436-
437-
$claims->addClaim( $claim1 );
438-
$this->assertFalse( $claims->isEmpty() );
439-
440-
$claims->removeClaim( $claim1 );
441-
$this->assertTrue( $claims->isEmpty() );
442-
}
443-
444431
}

0 commit comments

Comments
 (0)