Skip to content

Commit d362254

Browse files
lucaswerkmeisterWMDE bot
authored andcommitted
Remove confusing “by reference” wording from data-model
If I understand Thiemo’s explanation correctly, this is essentially a PHP 4 concern surviving in our code base: in PHP 4, objects were by default passed “by value” (i.e., by shallow copy, just like arrays still are), and to get a shared mutable object (or just to avoid the cost of copying objects all the time) you would have to explicitly pass them around “by reference” instead. Since PHP 5, objects are always passed by reference, so this distinction is no longer relevant. Change-Id: Ic08d1de5d743e174d8664a06dc65ce44d48c1d67
1 parent eb3c29f commit d362254

6 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/Statement/StatementListHolder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @since 3.0
99
* @deprecated since 5.1, will be removed in favor of StatementListProvider, which
10-
* gives the guarantee to return an object by reference. Changes to that object change the entity.
10+
* gives the guarantee to return a mutable object. Changes to that object change the entity.
1111
*
1212
* @license GPL-2.0-or-later
1313
* @author Thiemo Kreuz

src/Statement/StatementListProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Common interface for classes (typically Entities) that contain a StatementList. Implementations
7-
* must guarantee this returns the original, mutable object by reference.
7+
* must guarantee this returns the original, mutable object.
88
*
99
* @since 2.2.0
1010
*
@@ -14,7 +14,7 @@
1414
interface StatementListProvider {
1515

1616
/**
17-
* This is guaranteed to return the original, mutable object by reference.
17+
* This is guaranteed to return the original, mutable object.
1818
*
1919
* @return StatementList
2020
*/

src/Term/AliasesProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Common interface for classes (typically Entities) that contain an AliasGroupList. Implementations
7-
* must guarantee this returns the original, mutable object by reference.
7+
* must guarantee this returns the original, mutable object.
88
*
99
* @since 4.1
1010
*
@@ -14,7 +14,7 @@
1414
interface AliasesProvider {
1515

1616
/**
17-
* This is guaranteed to return the original, mutable object by reference.
17+
* This is guaranteed to return the original, mutable object.
1818
*
1919
* @return AliasGroupList
2020
*/

src/Term/DescriptionsProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
/**
66
* Common interface for classes (typically Entities) that contain a TermList, representing
7-
* descriptions. Implementations must guarantee this returns the original, mutable object by
8-
* reference.
7+
* descriptions. Implementations must guarantee this returns the original, mutable object.
98
*
109
* @since 4.1
1110
*
@@ -15,7 +14,7 @@
1514
interface DescriptionsProvider {
1615

1716
/**
18-
* This is guaranteed to return the original, mutable object by reference.
17+
* This is guaranteed to return the original, mutable object.
1918
*
2019
* @return TermList
2120
*/

src/Term/FingerprintProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Common interface for classes (typically Entities) that contain a Fingerprint. Implementations
7-
* must guarantee this returns the original, mutable object by reference.
7+
* must guarantee this returns the original, mutable object.
88
*
99
* @since 0.7.3
1010
*
@@ -14,7 +14,7 @@
1414
interface FingerprintProvider {
1515

1616
/**
17-
* This is guaranteed to return the original, mutable object by reference.
17+
* This is guaranteed to return the original, mutable object.
1818
*
1919
* @return Fingerprint
2020
*/

src/Term/LabelsProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Common interface for classes (typically Entities) that contain a TermList, representing labels.
7-
* Implementations must guarantee this returns the original, mutable object by reference.
7+
* Implementations must guarantee this returns the original, mutable object.
88
*
99
* @since 4.1
1010
*
@@ -14,7 +14,7 @@
1414
interface LabelsProvider {
1515

1616
/**
17-
* This is guaranteed to return the original, mutable object by reference.
17+
* This is guaranteed to return the original, mutable object.
1818
*
1919
* @return TermList
2020
*/

0 commit comments

Comments
 (0)