Skip to content

Commit 1e3d483

Browse files
committed
Do not return anything from Entity setters
1 parent f48f644 commit 1e3d483

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

RELEASE-NOTES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ Other breaking changes:
3838
* Removed previously deprecated `Property::newEmpty`, use `Property::newFromType` or `new Property()` instead
3939
* Renamed `StatementList::getWithPropertyId` to `StatementList::getByPropertyId`
4040
* Renamed `StatementList::getWithRank` to `StatementList::getByRank`
41-
* `Reference` and `ReferenceList`s no longer can not be instantiated with `null`
42-
* Added `setId` method to `EntityDocument`
41+
* `Entity::setLabel` and `Entity::setDescription` no longer return anything
42+
* `Reference` and `ReferenceList`s no longer can be instantiated with `null`
4343

4444
#### Additions
4545

46+
* Added `EntityDocument::setId`
4647
* Added `StatementByGuidMap`
4748
* Added `StatementListHolder`
4849
* Added `StatementList::getFirstStatementWithGuid`

src/Entity/Entity.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,9 @@ public function getId() {
5454
*
5555
* @param string $languageCode
5656
* @param string $value
57-
*
58-
* @return string
5957
*/
6058
public function setLabel( $languageCode, $value ) {
6159
$this->fingerprint->setLabel( $languageCode, $value );
62-
return $value;
6360
}
6461

6562
/**
@@ -69,12 +66,9 @@ public function setLabel( $languageCode, $value ) {
6966
*
7067
* @param string $languageCode
7168
* @param string $value
72-
*
73-
* @return string
7469
*/
7570
public function setDescription( $languageCode, $value ) {
7671
$this->fingerprint->setDescription( $languageCode, $value );
77-
return $value;
7872
}
7973

8074
/**

tests/unit/Entity/ItemIdSetTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ public function testGivenDuplicates_noLongerPresentInIteration() {
9191
}
9292

9393
/**
94-
* @dataProvider setProvider
94+
* @dataProvider itemIdSetProvider
9595
*/
9696
public function testGivenTheSameSet_equalsReturnsTrue( ItemIdSet $set ) {
9797
$this->assertTrue( $set->equals( $set ) );
9898
$this->assertTrue( $set->equals( clone $set ) );
9999
}
100100

101-
public function setProvider() {
101+
public function itemIdSetProvider() {
102102
return array(
103103
array(
104104
new ItemIdSet(),

0 commit comments

Comments
 (0)