| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function set( Statement $statement, EditInfo $editInfo = null ) { |
||
| 49 | if ( $statement->getGuid() === null ) { |
||
| 50 | throw new InvalidArgumentException( 'Can not set a statement that does not have a GUID' ); |
||
| 51 | } |
||
| 52 | |||
| 53 | $params = [ |
||
| 54 | 'claim' => json_encode( $this->statementSerializer->serialize( $statement ) ), |
||
| 55 | ]; |
||
| 56 | |||
| 57 | $this->api->postRequest( 'wbsetclaim', $params, $editInfo ); |
||
| 58 | return true; |
||
| 59 | } |
||
| 60 | |||
| 62 |