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 @@ -140,13 +140,13 @@ public function getWithUniqueMainSnaks() {
140140 }
141141
142142 /**
143- * @since 2.3
143+ * @since 3.0
144144 *
145145 * @param PropertyId $id
146146 *
147147 * @return self
148148 */
149- public function getWithPropertyId ( PropertyId $ id ) {
149+ public function getByPropertyId ( PropertyId $ id ) {
150150 $ statementList = new self ();
151151
152152 foreach ( $ this ->statements as $ statement ) {
Original file line number Diff line number Diff line change @@ -503,17 +503,17 @@ public function testGetMainSnaks() {
503503 );
504504 }
505505
506- public function testGivenNotKnownPropertyId_getWithPropertyIdReturnsEmptyList () {
506+ public function testGivenNotKnownPropertyId_getByPropertyIdReturnsEmptyList () {
507507 $ list = new StatementList ();
508508 $ list ->addNewStatement ( new PropertyNoValueSnak ( 42 ) );
509509
510510 $ this ->assertEquals (
511511 new StatementList (),
512- $ list ->getWithPropertyId ( new PropertyId ( 'P2 ' ) )
512+ $ list ->getByPropertyId ( new PropertyId ( 'P2 ' ) )
513513 );
514514 }
515515
516- public function testGivenKnownPropertyId_getWithPropertyIdReturnsListWithOnlyMatchingStatements () {
516+ public function testGivenKnownPropertyId_getByPropertyIdReturnsListWithOnlyMatchingStatements () {
517517 $ list = new StatementList ();
518518 $ list ->addNewStatement ( new PropertyNoValueSnak ( 42 ) );
519519 $ list ->addNewStatement ( new PropertyNoValueSnak ( 9001 ) );
@@ -526,7 +526,7 @@ public function testGivenKnownPropertyId_getWithPropertyIdReturnsListWithOnlyMat
526526
527527 $ this ->assertEquals (
528528 $ expected ,
529- $ list ->getWithPropertyId ( new PropertyId ( 'P42 ' ) )
529+ $ list ->getByPropertyId ( new PropertyId ( 'P42 ' ) )
530530 );
531531 }
532532
You can’t perform that action at this time.
0 commit comments