Skip to content

Commit 4139866

Browse files
committed
Merge pull request #544 from wmde/statementClaims
Avoid calling Statement's $claim
2 parents b70d447 + af7a4e2 commit 4139866

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/Claim/Claims.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ private function getGuidKey( $guid ) {
5959
}
6060

6161
/**
62-
* @param Statement $claim
62+
* @param Statement $statement
6363
*
6464
* @throws InvalidArgumentException
6565
* @return string
6666
*/
67-
private function getClaimKey( Statement $claim ) {
68-
$guid = $claim->getGuid();
67+
private function getClaimKey( Statement $statement ) {
68+
$guid = $statement->getGuid();
6969

7070
if ( $guid === null ) {
71-
throw new InvalidArgumentException( 'Can\'t handle claims with no GUID set!' );
71+
throw new InvalidArgumentException( 'Can\'t handle statements with no GUID set' );
7272
}
7373

7474
$key = $this->getGuidKey( $guid );
@@ -79,16 +79,16 @@ private function getClaimKey( Statement $claim ) {
7979
* @since 0.1
8080
* @deprecated since 1.0, use StatementList::addStatement() instead.
8181
*
82-
* @param Statement $claim
82+
* @param Statement $statement
8383
*
8484
* @throws InvalidArgumentException
8585
*/
86-
public function addClaim( Statement $claim ) {
86+
public function addClaim( Statement $statement ) {
8787
if ( func_num_args() > 1 ) {
8888
throw new InvalidArgumentException( '$index is not supported any more' );
8989
}
9090

91-
$this[] = $claim;
91+
$this[] = $statement;
9292
}
9393

9494
/**
@@ -166,16 +166,16 @@ public function offsetGet( $guid ) {
166166
* @deprecated since 1.0, should never be called.
167167
*
168168
* @param string $guid
169-
* @param Statement $claim
169+
* @param Statement $statement
170170
*
171171
* @throws InvalidArgumentException
172172
*/
173-
public function offsetSet( $guid, $claim ) {
174-
if ( !( $claim instanceof Statement ) ) {
175-
throw new InvalidArgumentException( '$claim must be an instance of Statement' );
173+
public function offsetSet( $guid, $statement ) {
174+
if ( !( $statement instanceof Statement ) ) {
175+
throw new InvalidArgumentException( '$statement must be an instance of Statement' );
176176
}
177177

178-
$claimKey = $this->getClaimKey( $claim );
178+
$claimKey = $this->getClaimKey( $statement );
179179

180180
if ( $guid !== null ) {
181181
$guidKey = $this->getGuidKey( $guid );
@@ -185,7 +185,7 @@ public function offsetSet( $guid, $claim ) {
185185
}
186186
}
187187

188-
parent::offsetSet( $claimKey, $claim );
188+
parent::offsetSet( $claimKey, $statement );
189189
}
190190

191191
/**

0 commit comments

Comments
 (0)