Skip to content

Commit 9ba92c1

Browse files
committed
More specific deprecation tags
1 parent 1ca5f0c commit 9ba92c1

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/Entity/Entity.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public function copy() {
350350

351351
/**
352352
* @since 0.3
353-
* @deprecated since 1.0
353+
* @deprecated since 1.0, use getStatements()->addStatement() instead.
354354
*
355355
* @param Claim $claim
356356
*
@@ -363,7 +363,7 @@ public function addClaim( Claim $claim ) {
363363

364364
/**
365365
* @since 0.3
366-
* @deprecated since 1.0
366+
* @deprecated since 1.0, use getStatements()->toArray() instead.
367367
*
368368
* @return Claim[]
369369
*/
@@ -378,7 +378,7 @@ public function getClaims() {
378378
* the check without forcing an unstub in contrast to count( $this->getClaims() ).
379379
*
380380
* @since 0.2
381-
* @deprecated since 1.0
381+
* @deprecated since 1.0, use getStatements()->isEmpty() instead.
382382
*
383383
* @return bool
384384
*/
@@ -388,7 +388,7 @@ public function hasClaims() {
388388

389389
/**
390390
* @since 0.3
391-
* @deprecated since 1.0
391+
* @deprecated since 1.0, use new Statement() instead.
392392
*
393393
* @param Snak $mainSnak
394394
*

src/Entity/Item.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function setSiteLinkList( SiteLinkList $siteLinks ) {
110110
* If there already is a site link with the site id of the provided site link,
111111
* then that one will be overridden by the provided one.
112112
*
113-
* @deprecated since 0.8, use getSiteLinkList and setSiteLinkList instead
113+
* @deprecated since 0.8, use getSiteLinkList()->addSiteLink() instead.
114114
* @since 0.6
115115
*
116116
* @param SiteLink $siteLink
@@ -126,7 +126,7 @@ public function addSiteLink( SiteLink $siteLink ) {
126126
/**
127127
* Removes the sitelink with specified site ID if the Item has such a sitelink.
128128
*
129-
* @deprecated since 0.8, use getSiteLinkList and setSiteLinkList instead
129+
* @deprecated since 0.8, use getSiteLinkList()->removeLinkWithSiteId() instead.
130130
* @since 0.1
131131
*
132132
* @param string $siteId the target site's id
@@ -136,7 +136,7 @@ public function removeSiteLink( $siteId ) {
136136
}
137137

138138
/**
139-
* @deprecated since 0.8, use getSiteLinkList and setSiteLinkList instead
139+
* @deprecated since 0.8, use getSiteLinkList() instead,
140140
* @since 0.6
141141
*
142142
* @return SiteLink[]
@@ -146,7 +146,7 @@ public function getSiteLinks() {
146146
}
147147

148148
/**
149-
* @deprecated since 0.8, use getSiteLinkList and setSiteLinkList instead
149+
* @deprecated since 0.8, use getSiteLinkList()->getBySiteId() instead.
150150
* @since 0.6
151151
*
152152
* @param string $siteId
@@ -159,7 +159,7 @@ public function getSiteLink( $siteId ) {
159159
}
160160

161161
/**
162-
* @deprecated since 0.8, use getSiteLinkList and setSiteLinkList instead
162+
* @deprecated since 0.8, use getSiteLinkList()->hasLinkWithSiteId() instead.
163163
* @since 0.4
164164
*
165165
* @param string $siteId
@@ -171,7 +171,7 @@ public function hasLinkToSite( $siteId ) {
171171
}
172172

173173
/**
174-
* @deprecated since 0.8, use getSiteLinkList and setSiteLinkList instead
174+
* @deprecated since 0.8, use getSiteLinkList()->isEmpty() instead.
175175
* @since 0.5
176176
*
177177
* @return bool
@@ -201,7 +201,7 @@ public function getType() {
201201
}
202202

203203
/**
204-
* @deprecated since 1.0
204+
* @deprecated since 1.0, use new Statement() instead.
205205
*
206206
* @param Snak $mainSnak
207207
*

src/Entity/Property.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function hasClaims() {
233233
}
234234

235235
/**
236-
* @deprecated since 1.0
236+
* @deprecated since 1.0, use new Statement() instead.
237237
*
238238
* @param Snak $mainSnak
239239
*

0 commit comments

Comments
 (0)