File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ Other breaking changes:
3636* Removed previously deprecated ` Entity::getAllSnaks ` , use ` StatementList::getAllSnaks ` instead
3737* Removed previously deprecated ` EntityId::getPrefixedId ` , use ` EntityId::getSerialization ` instead
3838* Removed previously deprecated ` Property::newEmpty ` , use ` Property::newFromType ` or ` new Property() ` instead
39+ * Renamed ` StatementList::getWithPropertyId ` to ` StatementList::getByPropertyId `
3940* ` Reference ` and ` ReferenceList ` s no longer can not be instantiated with ` null `
4041* Added ` setId ` method to ` EntityDocument `
4142
Original file line number Diff line number Diff line change @@ -138,13 +138,13 @@ public function getWithUniqueMainSnaks() {
138138 }
139139
140140 /**
141- * @since 2.3
141+ * @since 3.0
142142 *
143143 * @param PropertyId $id
144144 *
145145 * @return self
146146 */
147- public function getWithPropertyId ( PropertyId $ id ) {
147+ public function getByPropertyId ( PropertyId $ id ) {
148148 $ statementList = new self ();
149149
150150 foreach ( $ this ->statements as $ statement ) {
Original file line number Diff line number Diff line change @@ -516,17 +516,17 @@ public function testGetMainSnaks() {
516516 );
517517 }
518518
519- public function testGivenNotKnownPropertyId_getWithPropertyIdReturnsEmptyList () {
519+ public function testGivenNotKnownPropertyId_getByPropertyIdReturnsEmptyList () {
520520 $ list = new StatementList ();
521521 $ list ->addNewStatement ( new PropertyNoValueSnak ( 42 ) );
522522
523523 $ this ->assertEquals (
524524 new StatementList (),
525- $ list ->getWithPropertyId ( new PropertyId ( 'P2 ' ) )
525+ $ list ->getByPropertyId ( new PropertyId ( 'P2 ' ) )
526526 );
527527 }
528528
529- public function testGivenKnownPropertyId_getWithPropertyIdReturnsListWithOnlyMatchingStatements () {
529+ public function testGivenKnownPropertyId_getByPropertyIdReturnsListWithOnlyMatchingStatements () {
530530 $ list = new StatementList ();
531531 $ list ->addNewStatement ( new PropertyNoValueSnak ( 42 ) );
532532 $ list ->addNewStatement ( new PropertyNoValueSnak ( 9001 ) );
@@ -539,7 +539,7 @@ public function testGivenKnownPropertyId_getWithPropertyIdReturnsListWithOnlyMat
539539
540540 $ this ->assertEquals (
541541 $ expected ,
542- $ list ->getWithPropertyId ( new PropertyId ( 'P42 ' ) )
542+ $ list ->getByPropertyId ( new PropertyId ( 'P42 ' ) )
543543 );
544544 }
545545
You can’t perform that action at this time.
0 commit comments